Skip to content

ProxySQL

Connecting to the databases

To connect to the database through the proxy, as administrator, using the CLI tool, type the following:

mysql -h <proxy-ip-alias> -P  <proxy-port> -u admin -p

Connecting for the first time

Before connecting to the mysql databases through the proxy for the first time, a modification of the expired default password for the admin account has to be performed on the master node.

Otherwise, any attempt to connect the nodes through the proxy with an expired password will throw the following error:

ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.

Creating a user

For the creation of a new user:

Connect to the proxy and use regular MySQL commands to add the user and grant it with privileges.

CREATE USER 'foo'@'%.cern.ch' IDENTIFIED BY 'foo-passwod';
GRANT SELECT ON *.* TO 'foo'@'%.cern.ch';

More information

More information regarding ProxySQL and its functionality can be found in the Official web page.