官方ProxySQL Docker镜像,提供高性能MySQL数据库代理功能,用于数据库连接管理、读写分离、负载均衡及高可用部署。
Overview
ProxySQL is a high performance, high availability, protocol aware proxy for MySQL and PostgreSQL. All the while getting the unlimited *** that comes with a GPL license.
Its development is driven by the lack of open source proxies that provide high performance.
Details at http://www.proxysql.com/ website.
Image Description
To pull the latest image simply run:
bash$ docker pull proxysql/proxysql
Or otherwise for a specific version (images use semantic versioning) specify the associated tag:
e.g. for version 3.0.3:
bash$ docker pull proxysql/proxysql:3.0.3
e.g. for version 2.7.3:
bash$ docker pull proxysql/proxysql:2.7.3
Omitted version or part of implies latest in series:
e.g. latest in the 3.0.y series:
bash$ docker pull proxysql/proxysql:3.0
e.g. latest in the 3.x.y series:
bash$ docker pull proxysql/proxysql:3
The image is based on Debian and runs ProxySQL as a foreground process.
- NOTE: The package doesn't contain the MySQL client
Run
To run a ProxySQL container with a custom ProxySQL configuration file:
bash$ docker run -p 16032:6032 -p 16033:6033 -p 16070:6070 -d -v /path/to/proxysql.cnf:/etc/proxysql.cnf proxysql/proxysql
NOTE: You will need to define a second pair of admin credentials to connect outside of your container.
Sample config file (i.e. /path/to/proxysql.cnf listed above)
The following basic configuration file should be sufficient for development purposes,
this configuration will allow you to connect to your ProxySQL Docker container remotely
using the second pair of admin_credentials e.g.:
mysql -h127.0.0.1 -P16032 -uradmin -pradmin --prompt "ProxySQL Admin>"
datadir="/var/lib/proxysql" admin_variables= { admin_credentials="admin:admin;radmin:radmin" mysql_ifaces="0.0.0.0:6032" } mysql_variables= { threads=4 max_connections=2048 default_query_delay=0 default_query_timeout=36000000 have_compress=true poll_timeout=2000 interfaces="0.0.0.0:6033" default_schema="information_schema" stacksize=1048576 server_version="5.5.30" connect_timeout_server=3000 monitor_username="monitor" monitor_password="monitor" monitor_history=600000 monitor_connect_interval=60000 monitor_ping_interval=10000 monitor_read_only_interval=1500 monitor_read_only_timeout=500 ping_interval_server_msec=120000 ping_timeout_server=500 commands_stats=true sessions_sort=true connect_retries_on_failure=10 }
Dockerfile
Details in https://github.com/ProxySQL/docker-images/tree/main/proxysql-images repo.
proxysql/proxysql Related Documentation
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
轩辕镜像加速拉取命令点我查看更多 proxysql 镜像标签
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务
