标签:直接 pre cti cat tab sql命令 转换 默认 sqllite
当ProxySQL启动后,将监听两个端口:
ProxySQL的admin管理接口是一个使用MySQL协议的接口,所以,可以直接使用mysql客户端、navicat等工具去连接ProxySQL的管理接口:
[root@server ~]# mysql -uadmin -padmin -h127.0.0.1 -P6032
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.5.30 (ProxySQL Admin Module)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
mysql>
mysql> show dataases;
ERROR 1045 (#2800): near "show": syntax error
mysql> show databases;
+-----+---------------+-------------------------------------+
| seq | name | file |
+-----+---------------+-------------------------------------+
| 0 | main | |
| 2 | disk | /var/lib/proxysql/proxysql.db |
| 3 | stats | |
| 4 | monitor | |
| 5 | stats_history | /var/lib/proxysql/proxysql_stats.db |
+-----+---------------+-------------------------------------+
5 rows in set (0.00 sec)
mysql>
由于ProxySQL的配置全部保存在几个自带的库中,所以通过管理接口,可以非常方便地通过发送一些SQL命令去修改ProxySQL的配置。ProxySQL会解析通过该接口发送的某些对ProxySQL有效的特定命令,将其合理转换后发送给内嵌的SQLLite3数据据库引擎去运行ProxySQL有效的特定命令,并将其合理转换后发送给内嵌的SQLite3数据库引擎去运行ProxySQL的配置几乎都是通过管理接口来操作的,通过Admin接口管理,可以在线修改几乎所有的配置并使其生效。只有两个变量的配置是必须重启proxySQL才能生效的,它们是:mysql-threads和mysql-stacksize
标签:直接 pre cti cat tab sql命令 转换 默认 sqllite
原文地址:https://www.cnblogs.com/liuzhijun666/p/13190847.html