安装包下载地址: https://github.com/sysown/proxysql/releases
wget https://github.com/sysown/proxysql/releases/download/v2.0.14/proxysql_2.0.14-ubuntu16_amd64.deb
dpkg -i proxysql_2.0.14-ubuntu16_amd64.deb
cat <<EOF | tee /etc/yum.repos.d/proxysql.repo
[proxysql_repo]
name= ProxySQL YUM repository
baseurl=https://repo.proxysql.com/ProxySQL/proxysql-2.0.x/centos/\$releasever
gpgcheck=1
gpgkey=https://repo.proxysql.com/ProxySQL/repo_pub_key
EOF
Ubuntu / Debian
```
apt-get install -y lsb-release
wget -O - 'https://repo.proxysql.com/ProxySQL/repo_pub_key' | apt-key add -
echo deb https://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 OR apt-get install proxysql=version
### 启动/停止/重启服务
service proxysql start
service proxysql stop
service proxysql restart
### 配置文件
- 配置文件路径
/etc/proxysql.cnf
- 常用配置
datadir: proxysql ##数据文件存放目录, 和审计日志、查询日志等
errorlog: ##错误日志目录
admin_variables=
{
admin_credentials="admin:admin" ##proxysql管理账号
mysql_ifaces="0.0.0.0:6032" ## proxysql管理端口
}
mysql_variables=
{
interfaces="0.0.0.0:6033" ## proxysql代理访问端口, 一般开放给用户
}
```
欢迎添加微信,互相学习↑↑↑ -_-
白老虎
programming is not only to solve problems, ways to think
grafana 级连 菜单 templating (variables) 配置
rocketmq 集群搭建 (2master + 2slave + 2namesrv)
AI 机器人 抓取 微信 聊天中的 百度网盘 分享地址和密码