hi,
I follow the Percona xtraDB cluster installation menu to setup ProxySQL , but when I connect from workbench using an account to login to the proxySQL and I expect I can select the backend MySQL data. It is not !
the menu I follow is “LOAD BALANCING WITH PROXYSQL” section in “Percona XtraDB Cluster Documentation, Release 8.0.19-10”.
What I have done is:
1) I have install ProxySQL:
Percona-XtraDB-Cluster-client-80.xxxx rpm
proxysql2.xxxx rpm
once installed this commands is ok:
“mysql -u admin -padmin -h 127.0.0.1 -P 6032”
and "mysql -u admin -padmin -h 127.0.0.1 -P6032 --prompt=‘Admin> ’ " .
2) I can do mysql@proxysql> SHOW DATABASES;
mysql@proxysql> SHOW TABLES;
3) I can add nodes to the proxysQL:
mysql@proxysql> INSERT INTO mysql_servers(hostgroup_id, hostname, port) VALUES (0,˓→’192.168.70.61’,3306);mysql@proxysql> INSERT INTO mysql_servers(hostgroup_id, hostname, port) VALUES (0,˓→’192.168.70.62’,3306);mysql@proxysql> INSERT INTO mysql_servers(hostgroup_id, hostname, port) VALUES (0,˓→’192.168.70.63’,3306);
and I do select * from mysql_Servers, it shown out what I inserted,
4)I create proxysql user and add to ono of the percona db nodes as the proxySQL to DB monitoring account.
mysql@pxc2> CREATE USER
‘proxysql’@‘%’ IDENTIFIED WITH mysql_native_password by ‘<password>’;
mysql@pxc2> GRANT USAGE ON *.* TO 'proxysql'@'%';
5) configure this user on the ProxySQL node:
mysql@proxysql> UPDATE global_variables SET variable_value='proxysql'
WHERE variable_name='mysql-monitor_username';
mysql@proxysql> UPDATE global_variables SET variable_value='<password>'
WHERE variable_name='mysql-monitor_password';
6)
mysql@proxysql> LOAD MYSQL VARIABLES TO RUNTIME;
mysql@proxysql> SAVE MYSQL VARIABLES TO DISK;
7) however when doing this to ensure that monitoring is enabled,:
mysql@proxysql> SELECT * FROM monitor.mysql_server_connect_log ORDER BY time_start_us
˓→DESC LIMIT 6;
it say monitor.mysql_server_connect_log doesn't exists ! why ?
7) to enabled mnnitorings of these nodes, load them at runtime:
mysql@proxysql> LOAD MYSQL SERVERS TO RUNTIME;
8) Creating ProxySQL Monitoring User
mysql@pxc2> CREATE USER 'proxysql'@'%' IDENTIFIED WITH mysql_native_password by '$3Kr
˓→$t';
mysql@pxc2> GRANT USAGE ON *.* TO 'proxysql'@'%';
9) Creating ProxySQL Client User
is this one create in proxySQL level or database level? which user account has to be create on both proxySQL side and DB size?
is this one user connect to DB back bone via proxySQL ?
so this one must both in proxysql and DB level ? both must use the SAME password?
Is this one the application account application use to connect to DB via proxy ?
question:
1) once I connect using client user, it will be timeout message when connect to the proxySQL!
and what is the mapping so that proxySQL know which account used to connect to backed DB ? it is not the monitor account which we have to create in dB side, right?
2) what is missing in the above steps ?