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
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.mysql-proxy
are you using now?