1

I have tried installing using sudo apt-get as below but got error

majid@K53SC:~$ sudo apt-get install mysql-proxy
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package mysql-proxy

Tried to download linux-Genereic (https://downloads.mysql.com/archives/proxy/) and extract and run; but mysql client can't connect to server via proxy:

Terminal 1:

$ mysql-proxy --proxy-address=127.0.0.1:4040 --proxy-backend-addresses=localhost:3306 --proxy-lua-script=/home/majid/Documents/first_example.lua --plugins=proxy
2016-11-01 20:34:20: (critical) plugin proxy 0.8.5 started
we got a normal query: select @@version_comment limit 1

Terminal 2:

majid@K53SC:~$ mysql -h 127.0.0.1 -P4040 -u root -ppassword
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.

and it stays there; nothing happens.

so what is correct way to install and use mysql-proxy in Ubuntu 16.04?

Regards

Edit:

As per David Foerster's comment I have downloaded the Deb package Trusty, and installed. I get now as below:

Terminal 1:

$ mysql-proxy --proxy-address=127.0.0.1:4040 --proxy-backend-addresses=localhost:3306 --proxy-lua-script=/home/majid/Documents/first_example.lua --plugins=proxy

Terminal 2:

$ mysql -h 127.0.0.1 -P4040 -u root -ppassword
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1043 (08S01): Bad handshake
  • Could you please post text files, dialogue messages, and program output listings as text, not as images? To achieve the latter two you can either 1) select, copy & paste the dialogue text or terminal content or 2) save the program output to a file and use that. Longer listings (>100 lines) should be uploaded to a pastie service and linked to in the question. Thanks. – David Foerster Nov 1 '16 at 13:18
  • mysql-proxy doesn't exist in Xenial any longer. Could you please download the Deb package for Trusty, try to install it and report back? The dependencies look like it should work in Xenial too. Depending on your results I'll write an answer. Thanks. – David Foerster Nov 1 '16 at 13:22
  • @DavidFoerster Thank you so much for your comment. I was so desperate and not finding any solution anywhere. I have done as you said. Please help me put what to do next. Thanks again – Majid NK Nov 1 '16 at 15:23
  • Which versions of MySQL/MariaDB and mysql-proxy are you using now? – David Foerster Nov 1 '16 at 15:50
  • @DavidFoerster I'm using MySQL 5.7.16 – Majid NK Nov 1 '16 at 15:53
1

The mysql-proxy project seems to be abandoned since over 2 years which is the likely reason for its removal from the Xenial repositories. It's probably incompatible with newer MySQL releases.

The 3-years-old INSTALL notice recommends version 5.1.x while the Xenial repositories include MySQL 5.7 and no older release.

| improve this answer | |
  • Hello from Ubuntu 14.04 and now all works so well :) Thanks for the help and also the link, for sure it will be helpful. Regards – Majid NK Nov 1 '16 at 17:16
-1

MariaDB addressed this with MaxScale MySQL proxy. It's available for download on their website. Additionally if you use AWS you can run wrapped up MaxScale from the Marketplace as SQLSplitter https://www.youtube.com/embed/IGkEdceW0so

| improve this answer | |
  • The OP asked for a proxy. How does this make sense ? – userDepth Nov 27 '16 at 20:16
  • 1
    Yes it is a SQL proxy. It also offers read / write splitting between master and slaves – SmartAMI Nov 27 '16 at 22:23
-1

Don't use mysql-proxy. See the big warning notice on the official download page:

MySQL Proxy is not GA, and is not recommended for Production use. We recommend MySQL Router for production use. Download MySQL Router

| improve this answer | |
  • you don't see how this addresses the question? mysql-proxy is out of date, mysql router does exaclty the same and is the newer type of tech. for the same problem field. I also used mysql proxy in 14.04 and after updating to 16.04 mysql-router is your friend. Mysql folks say's exactly that, with the hint i posted, – Chris Tobba Jun 13 '17 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.