proxysql 开启http监控页面的方法
阅读原文时间:2023年07月09日阅读:1
update global_variables set variable_value='true' where variable_name='admin-web_enabled';
LOAD ADMIN VARIABLES TO RUNTIME;
SAVE ADMIN VARIABLES TO DISK;

查看端口和登录web界面的用户名和密码,用户名和密码与stat账户一致:

mysql> select * from global_variables where variable_name LIKE 'admin-web%' or variable_name LIKE 'admin-stats%';
+----------------------------------------+----------------+
| variable_name                          | variable_value |
+----------------------------------------+----------------+
| admin-stats_credentials                | stats:stats    |
| admin-stats_mysql_connections          | 60             |
| admin-stats_mysql_connection_pool      | 60             |
| admin-stats_mysql_query_cache          | 60             |
| admin-stats_mysql_query_digest_to_disk | 0              |
| admin-stats_system_cpu                 | 60             |
| admin-stats_system_memory              | 60             |
| admin-web_enabled                      | true           |
| admin-web_port                         | 6080           |
+----------------------------------------+----------------+

查看web端口是否正常打开

# lsof -i:6080
COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
proxysql 1295 proxysql   29u  IPv4 470544      0t0  TCP *:6080 (LISTEN)

问题:已经设置开启了,但是用浏览器无法访问,有待进一步研究解决

访问地址: https://x.x.x.x:6080/​​ 注意是https协议 (http访问不行)

账号和密码都是 stats,这个页面只能供查看,不能修改proxysql的运行配置。

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器