[Doris jdbc代理] -- 如何安装ProxySQL?

374人浏览 / 0人评论

安装文档(如果不能访问, 跳过)

安装包安装

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

安装命令安装

  • Red Hat / CentOS
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代理访问端口, 一般开放给用户
}

全部评论