ProxySQL容器化部署与运行

本文涉及的产品
容器镜像服务 ACR,镜像仓库100个 不限时长
简介: ProxySQL容器化部署与运行

启动

docker run -p 16032:6032 -p 16033:6033 -p 16070:6070 -d -v /path/to/proxysql.cnf:/etc/proxysql.cnf proxysql/proxysql

配置

# Config file contents referred to as "/path/to/proxysql.cnf"
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
}

The following basic configuration file should be sufficient for general development and testing 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>"

相关文章
|
1月前
|
Kubernetes 搜索推荐 Docker
K8S容器运行时弃用Docker转型Containerd
K8S容器运行时弃用Docker转型Containerd
79 0
|
2月前
|
Oracle 关系型数据库 数据库
|
4月前
|
Docker 容器
Docker学习笔记三:如何运行一个容器?
Docker学习笔记三:如何运行一个容器?
Docker学习笔记三:如何运行一个容器?
|
6月前
|
Kubernetes Java 容器
如何获取k8s容器里运行的jar包
如何获取k8s容器里运行的jar包
173 0
|
6月前
|
Linux Docker 容器
Docker容器运行Linux
Docker容器运行Linux
|
7月前
|
Kubernetes 流计算 容器
Flink on k8s的话,怎么在容器运行前初始化一些脚本?
Flink on k8s的话,怎么在容器运行前初始化一些脚本?
49 1
|
6月前
|
存储 传感器 物联网
如何在Docker中配置Mosquitto MQTT代理,以便在容器化环境中运行和管理MQTT通信
如何在Docker中配置Mosquitto MQTT代理,以便在容器化环境中运行和管理MQTT通信
318 0
如何在Docker中配置Mosquitto MQTT代理,以便在容器化环境中运行和管理MQTT通信
|
7月前
|
关系型数据库 MySQL Devops
docker容器刚启动就停止 — 运行mysql 报错 mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
docker容器刚启动就停止 — 运行mysql 报错 mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
274 0
|
1天前
|
NoSQL Redis Docker
Mac上轻松几步搞定Docker与Redis安装:从下载安装到容器运行实测全程指南
Mac上轻松几步搞定Docker与Redis安装:从下载安装到容器运行实测全程指南
10 0
|
4月前
|
Linux 开发者 Docker
如何构建在 Docker 容器中运行命令?
【1月更文挑战第6天】
61 0