proxysql 之一 setup

os: ubuntu 16.04
db: mysql 5.7.25
proxysql: 2.0.1

github 的 proxysql 是这样描述的: High-performance MySQL proxy with a GPL license.

规划如下:

192.168.56.92	node1
192.168.56.90	node2

192.168.56.88	proxysqlnode1

安装 mysql

在node1,node2节点使用 apt 方式安装mysql,并配置好 master/slave
下载 mysql apt 源 https://dev.mysql.com/downloads/repo/apt/
详细过程略可以参考<>.
<>.

proxysqlnode1 节点需要安装 mysql client.

# apt install mysql-client libmysqlclient-dev

安装依赖包

# apt install automake bzip2 cmake make gcc g++ \
git openssl


安装 proxysql

# wget https://github.com/sysown/proxysql/releases/download/v2.0.1/proxysql_2.0.1-ubuntu16_amd64.deb
# dpkg -i proxysql_2.0.1-ubuntu16_amd64.deb

# apt-get install -y lsb-release
# wget -O - 'http://repo.proxysql.com/ProxySQL/repo_pub_key' | apt-key add -
# echo deb http://repo.proxysql.com/ProxySQL/proxysql-2.0.x/$(lsb_release -sc)/ ./ \
| tee /etc/apt/sources.list.d/proxysql.list

# apt-get update
# apt-get install proxysql 

# dpkg -L proxysql
/.
/usr
/usr/share
/usr/share/proxysql
/usr/share/proxysql/tools
/usr/share/proxysql/tools/proxysql_galera_checker.sh
/usr/share/proxysql/tools/proxysql_galera_writer.pl
/usr/share/doc
/usr/share/doc/proxysql
/usr/share/doc/proxysql/README.Debian
/usr/share/doc/proxysql/copyright
/usr/share/doc/proxysql/changelog.gz
/usr/bin
/usr/bin/proxysql
/etc
/etc/proxysql.cnf
/etc/init.d
/etc/init.d/proxysql

重点看这几个文件

/usr/bin/proxysql
/etc/proxysql.cnf
/etc/init.d/proxysql

/usr/share/proxysql/tools/proxysql_galera_checker.sh
/usr/share/proxysql/tools/proxysql_galera_writer.pl

# systemctl status proxysql
# systemctl enable proxysql
# systemctl start proxysql # 重启后再修改 /etc/proxysql.cnf 是无法加载修改选项的.

# ps -ef|grep -i proxysql |grep -v grep
proxysql  9598     1  0 18:00 ?        00:00:00 /lib/systemd/systemd --user
proxysql  9599  9598  0 18:00 ?        00:00:00 (sd-pam)
proxysql  9620     1  0 18:00 ?        00:00:00 proxysql -c /etc/proxysql.cnf -D /var/lib/proxysql
proxysql  9621  9620  0 18:00 ?        00:00:00 proxysql -c /etc/proxysql.cnf -D /var/lib/proxysql

# proxysql --version
ProxySQL version 2.0.1-4-gac2e710, codename Truls

参考:
https://github.com/sysown/proxysql
https://github.com/sysown/proxysql/releases
https://github.com/sysown/proxysql/wiki

http://www.proxysql.com

https://www.percona.com/downloads/proxysql/

你可能感兴趣的:(#,mysql,ha,proxysql)