ProxySQL (2)

catchv·2022년 8월 26일

ProxySQL

목록 보기
2/3

1. ProxySQL 접속 방법

ProxySQL은 특이하게 mysql client tool로 접속하여 설정 값을 조정하여 서버를 관리 하는 형태임.

$ dnf install mysql # mysql client tool 설치
$ mysql -u admin -padmin -h 127.0.0.1 -P6032 --prompt='ProxySQL> ' --default-auth=mysql_native_password

ip, port는 porxysql.cnf 파일의
admin_variables.mysql_ifaces="0.0.0.0:6032" 값으로 구성됨.
id, password는 porxysql.cnf 파일의 admin_variables.admin_credentials="admin:admin" 값으로 구성됨.

2. ProxySQL databases

ProxySQL> show databases;
+-----+---------------+-----------------------------------+
| seq | name          | file                              |
+-----+---------------+-----------------------------------+
| 0   | main          |                                   |
| 2   | disk          | /data/proxysql//proxysql.db       |
| 3   | stats         |                                   |
| 4   | monitor       |                                   |
| 5   | stats_history | /data/proxysql//proxysql_stats.db |
+-----+---------------+-----------------------------------+

1) main
2) disk
3) stats
4) monitor
5) stats_history

3. ProxySQL tables
ProxySQL> show tables;
+----------------------------------------------------+
| tables                                             |
+----------------------------------------------------+
| global_variables                                   |
| mysql_aws_aurora_hostgroups                        |
| mysql_collations                                   |
| mysql_firewall_whitelist_rules                     |
| mysql_firewall_whitelist_sqli_fingerprints         |
| mysql_firewall_whitelist_users                     |
| mysql_galera_hostgroups                            |
| mysql_group_replication_hostgroups                 |
| mysql_query_rules                                  |
| mysql_query_rules_fast_routing                     |
| mysql_replication_hostgroups                       |
| mysql_servers                                      |
| mysql_users                                        |
| proxysql_servers                                   |
| restapi_routes                                     |
| runtime_checksums_values                           |
| runtime_global_variables                           |
| runtime_mysql_aws_aurora_hostgroups                |
| runtime_mysql_firewall_whitelist_rules             |
| runtime_mysql_firewall_whitelist_sqli_fingerprints |
| runtime_mysql_firewall_whitelist_users             |
| runtime_mysql_galera_hostgroups                    |
| runtime_mysql_group_replication_hostgroups         |
| runtime_mysql_query_rules                          |
| runtime_mysql_query_rules_fast_routing             |
| runtime_mysql_replication_hostgroups               |
| runtime_mysql_servers                              |
| runtime_mysql_users                                |
| runtime_proxysql_servers                           |
| runtime_restapi_routes                             |
| runtime_scheduler                                  |
| scheduler                                          |
+----------------------------------------------------+
  1. ProxySQL 버젼 확인
ProxySQL> SELECT @@VERSION;
+------------------+
| @@version        |
+------------------+
| 2.4.3-0-gf1b25b8 |
+------------------+
또는
$ proxysql --version
ProxySQL version 2.4.3-0-gf1b25b8, codename Truls

0개의 댓글