Configuration Tutorial:
Transferred from: http://www.centoscn.com/mysql/2015/0107/4437.html
CentOS Installation Mysql-proxy
mysql-proxy的用处就不再说了mysql-proxy依赖libevent,lua,glib2等几个软件
So before you install it, first
yum install lua-develyum install glib2-devel
Libevent I use source code installation,
Download the
Libevent-1.4.13-stable.tar.gz
tar zvfx libevent-1.4.13-stable.tar.gz./configure进去makemake install
Now it's time to install Mysql-proxy.
On Mysql-proxy
Download source code
or first?
tar zvfx./configuremakemake checkmake installldconfig
Now we can use Mysql-proxy.
As now our database is in 192.168.1.245, native address 192.168.1.201
We can do this.
mysql-proxy -P 192.168.1.201:3308 --proxy-backend-addresses=192.168.1.245:3306
Then the client can access 245 of the database with 192.168.1.201:3308, and the user name password is 245.
Some can only be accessed by the intranet, and not used to command line, so do
Access to intranet database via Mysql-proxy map external network