ProxySQL is a powerful software load balancer and an open-source database protocol-aware proxy for MySQL that provides high performance, high availability, and high availability.
Typically, a load balancer distributes network or application traffic among available servers, resulting in increased application efficiency, dependability, availability, and performance by boosting concurrent users and enhancing hardware utilization efficiency.
ProxySQL is a daemon that is monitored by a monitoring process. To reduce downtime, the process monitors the daemon and restarts it if it crashes. The daemon accepts traffic from MySQL clients and routes it to MySQL servers in the backend.
Inserting and Updating MySQL Users in ProxySQL
The MySQL users that clients can use to connect to ProxySQL and then backends are defined in the table mysql_users.
INSERT INTO mysql_users ( username, password, default_hostgroup )
VALUES ( ‘reportServer’, ‘somePassword’, 2);
UPDATE mysql_users SET max_connections=20000
DELETE FROM mysql_users
After adding the configuration, we must load the configuration into runtime and store it on disk. Otherwise, the configurations would be lost when the ProxySQL is restarted. So, in order to load the configuration into memory and save it to disk, the following commands are required.
# Active current in-memory MySQL User Configuration
LOAD MYSQL USERS TO RUNTIME;
SAVE MYSQL USERS TO DISK;
Hope you find this article helpful.