The Proxysql admin interface supports the MySQL protocol, which can be configured via the client connection to the Admin interface and input commands. Proxysql parse all the commands sent over the admin interface, and if there is no problem, it will happen to SQLite engine execution
Remember the difference between SQLite3 and MySQL, not that all SQL running on MySQL can be executed on SQLite3, such as the use command, and in SQLite3 it is not possible to change to the specified schema as you would think.
Connect to Proxysql Admin interface, we can see which databases exist below, like MySQL, execute show databases can
1Mysql>show databases;2 +-----+---------+------------------+3 |Seq|Name| file |4 +-----+---------+------------------+5 | 0 |Main| |6 | 2 | Disk | /Tmp/Proxysql.db|7 | 3 |Stats| |8 | 4 |Monitor| |9 | 5 |Myhgm| |Ten +-----+---------+------------------+ One 5Rowsinch Set(0.00Sec
View Code
Let's talk about the role of these schemas:
- Main: The memory configuration database, through this database, it is easy to automatically query and update the PROXYSQL configuration. Executing the load MYSQL USERS from memory or similar commands allows the in-memory configuration to be loaded into runtime.
- Disk: The physical image of the main database persisted to the disk, and at the time of the reboot, the data of the main database is not persisted, so it is either loaded from the disk database or through the configuration file
- Stats: Statistics through the proxy internal functions to collect the runtime status indicators, such as: the number of times each routing rule matching, the current query in the implementation of the
- Monitor:proxysql related metrics connected to the background MySQL server, such as: Ping background server maximum, minimum time
- MYHGM: Only used in debug mode
There are two types of users with default authentication that can connect to the Admin database for action:
- User:admin/password: Admin user capable of reading and writing all tables
- User:stats/password: A stats user with a read-only stattistics database that pulls statistics data from proxysql and does not expose other data.
The above authentication configuration is admin-admin_credentials
configured through and admin-stats_credentials
variable.
Reference documents
Proxysql the Admin Schemas