centos安裝mysql-proxy,centosmysql-proxy

來源:互聯網
上載者:User

centos安裝mysql-proxy,centosmysql-proxy

mysql-proxy的用處就不再說了mysql-proxy依賴libevent,lua,glib2等幾個軟體

所以在安裝之前先

yum install lua-develyum install glib2-devel

libevent我採用原始碼安裝,
下載的
libevent-1.4.13-stable.tar.gz

tar zvfx libevent-1.4.13-stable.tar.gz./configure進去makemake install

現在就可以安裝mysql-proxy了
上mysql-proxy
下載源碼
還是先

tar zvfx./configuremakemake checkmake installldconfig

現在就可以使用mysql-proxy了

如現在我們資料庫在192.168.1.245,本機地址192.168.1.201
我們可以這樣

 mysql-proxy -P 192.168.1.201:3308 --proxy-backend-addresses=192.168.1.245:3306

然後用戶端連192.168.1.201:3308即可訪問245的資料庫,使用者名稱密碼用245的。

有些只能內網訪問的,又用不慣命令列的,可以這麼幹

原文:http://my.oschina.net/gotham/blog/344823#OSC_h1_1

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.