Admin Variables

List of Admin Variables

NOTE: You can click on the variable name to jump to its definition

Variable name Default Value
admin-admin_credentials admin:admin
admin-checksum_mysql_query_rules true
admin-checksum_mysql_servers true
admin-checksum_mysql_users true
admin-cluster_check_interval_ms 1000
admin-cluster_check_status_frequency 10
admin-cluster_mysql_query_rules_diffs_before_sync 3
admin-cluster_mysql_query_rules_save_to_disk true
admin-cluster_mysql_servers_diffs_before_sync 3
admin-cluster_mysql_servers_save_to_disk true
admin-cluster_mysql_users_diffs_before_sync 3
admin-cluster_mysql_users_save_to_disk true
admin-cluster_password
admin-cluster_proxysql_servers_diffs_before_sync 3
admin-cluster_proxysql_servers_save_to_disk true
admin-cluster_username
admin-hash_passwords true
admin-mysql_ifaces 0.0.0.0:6032
admin-read_only false
admin-refresh_interval 2000
admin-restapi_enabled false
admin-restapi_port 6070
admin-stats_credentials stats:stats
admin-stats_mysql_connection_pool 60
admin-stats_mysql_connections 60
admin-stats_mysql_query_cache 60
admin-stats_system_cpu 60
admin-stats_system_memory 60
admin-telnet_admin_ifaces (null)
admin-telnet_stats_ifaces (null)
admin-vacuum_stats true
admin-version 2.0.7-80-g4dd4ef5f
admin-web_enabled false
admin-web_port 6080

admin-admin_credentials

This is a list of semi-colon separated user:password pairs, that can be used to authenticate to the admin interface with read-write rights. For read-only credentials that can be used to connect to the admin, see the variable admin-stats_credentials. Note that the admin interface listens on a separate port from the main ProxySQL thread. This port is controlled through the variable admin-mysql_ifaces.

It is important to note that:

  • the default admin user can only connect locally, in order to connect remotely a secondary user needs to be created by defining this in the admin-admin_credentials variable E.G. admin-admin_credentials="admin:admin;radminuser:radminpass".
  • users in admin-admin_credentials cannot be used also in mysql_users table.
System Variable Name admin-admin_credentials
Dynamic Yes
Permitted Values Type String
Default admin:admin

admin-checksum_mysql_query_rules

See ProxySQL Cluster

admin-checksum_mysql_servers

See ProxySQL Cluster

admin-checksum_mysql_users

See ProxySQL Cluster

admin-cluster_check_interval_ms

See ProxySQL Cluster

admin-cluster_check_status_frequency

See ProxySQL Cluster

admin-cluster_mysql_query_rules_diffs_before_sync

See ProxySQL Cluster

admin-cluster_mysql_query_rules_save_to_disk

See ProxySQL Cluster

admin-cluster_mysql_servers_diffs_before_sync

See ProxySQL Cluster

admin-cluster_mysql_servers_save_to_disk

See ProxySQL Cluster

admin-cluster_mysql_users_diffs_before_sync

See ProxySQL Cluster

admin-cluster_mysql_users_save_to_disk

See ProxySQL Cluster

admin-cluster_password

See ProxySQL Cluster

admin-cluster_proxysql_servers_diffs_before_sync

See ProxySQL Cluster

admin-cluster_proxysql_servers_save_to_disk/

See ProxySQL Cluster

admin-cluster_username

See ProxySQL Cluster

admin-hash_passwords

ProxySQL v1.2.3 introduced a new global boolean variable, admin-hash_passwords, enabled by default.
When admin-hash_passwords=true, password are automatically hashed at RUNTIME when running LOAD MYSQL USERS TO RUNTIME. Passwords in mysql_users tables are not automatically hashed and require you to run SAVE MYSQL USERS FROM RUNTIME.

See Password Management for further details.

System Variable Name admin-hash_passwords
Dynamic Yes
Permitted Values Type Boolean
Default true

admin-mysql_ifaces

Semicolon-separated list of hostname:port entries for interfaces on which the admin interface should listen on. Note that this also supports UNIX domain sockets for the cases where the connection is done from an application on the same machine E.G.: SET admin-mysql_ifaces='127.0.0.1:6032;/tmp/proxysql_admin.sock'. Please note that the default admin user can only connect locally, in order to connect remotely a secondary user needs to be created by defining this in the admin-admin_credentials variable E.G. admin-admin_credentials="admin:admin;radminuser:radminpass".

System Variable Name admin-mysql_ifaces
Dynamic Yes
Permitted Values Type String
Default (up to 1.4.0) 127.0.0.1:6032
Default (from 1.4.1 onwards) 0.0.0.0:6032

admin-read_only

When this variable is set to true and loaded at runtime, the Admin module does not accept write anymore. This is useful to ensure that ProxySQL is not reconfigured.
When admin-read_only=true, the only way to revert it to false at runtime (and make the Admin module writable again) is to run the command PROXYSQL READWRITE.

System Variable Name admin-read_only
Dynamic Yes
Permitted Values Type Boolean
Default false

admin-refresh_interval

The refresh interval (in microseconds) for updates to the query rules statistics and commands counters statistics. Be careful about tweaking this to a value that is:

  • too low, because it might affect the overall performance of the proxy
  • too high, because it might affect the correctness of the results
System Variable Name admin-refresh_interval
Dynamic Yes
Permitted Values Type Integer (microseconds)
Default 2000
Minimum 100
Maximum 100000

admin-restapi_enabled

It allows users to create new REST-API endpoints and execute scripts on behalf of ProxySQL. If admin-restapi_enabled is set to true, the REST-API is automatically enabled.

System Variable Name admin-restapi_enabled
Dynamic Yes
Permitted Values Type Boolean
Default false

admin-restapi_port

This variable defines on which port the REST-API is listening.

System Variable Name admin-restapi_port
Dynamic Yes
Permitted Values Type Integer
Default 6070

admin-stats_credentials

This is a list of semi-colon separated user:password pairs that defines the read-only credentials for connecting to the admin interface. These are not allowed updates to internal data structures such as the list of MySQL backend servers (or hostgroups), query rules, etc. They only allow readings from the statistics and monitoring tables (the other tables are not only even visible).
Note: users in admin-stats_credentials cannot be used also in mysql_users table.

System Variable Name admin-stats_credentials
Dynamic Yes
Permitted Values Type String
Default stats:stats

admin-telnet_admin_ifaces

Not currently used (planned usage in a future version).

admin-telnet_stats_ifaces

Not currently used (planned usage in a future version).

admin-version

This variable displays ProxySQL version. This variable is read only.

System Variable Name admin-version
Dynamic No
Permitted Values Type String
Read Only true

Admin historical statistics

Since ProxySQL 1.4.4 Admin stores historical metrics in new database named proxysql_stats.db in the datadir.
Tables structures is subject to future changes.

admin-stats_mysql_connection_pool

The refresh interval (in seconds) to update the historical statistics of the connection pool.

System Variable Name admin-stats_mysql_connection_pool
Dynamic Yes
Permitted Values Type Integer (seconds)
Default 60
Valid values 5, 10, 30, 60, 120, 300

admin-stats_mysql_connections

The refresh interval (in seconds) to update the historical statistics of MySQL connections, both frontends and backends.

System Variable Name admin-stats_mysql_connections
Dynamic Yes
Permitted Values Type Integer (seconds)
Default 60
Valid values 5, 10, 30, 60, 120, 300

admin-stats_mysql_query_cache

The refresh interval (in seconds) to update the historical statistics of MySQL Query Cache.

System Variable Name admin-stats_mysql_query_cache
Dynamic Yes
Permitted Values Type Integer (seconds)
Default 60
Valid values 5, 10, 30, 60, 120, 300

admin-stats_system_cpu

The refresh interval (in seconds) to update the historical statistics of CPU usage.

System Variable Name admin-stats_system_cpu
Dynamic Yes
Permitted Values Type Integer (seconds)
Default 60
Valid values 5, 10, 30, 60, 120, 300

admin-stats_system_memory

The refresh interval (in seconds) to update the historical statistics of memory usage.
Note: These statistics are not available if ProxySQL is not compiled with jemalloc. Note that all official packages are compiled with jemalloc.

System Variable Name admin-stats_mysql_system_memory
Dynamic Yes
Permitted Values Type Integer (seconds)
Default 60
Valid values 5, 10, 30, 60, 120, 300

admin-vacuum_stats

This parameter enables|disables the vacuum operation on the SQLite database storing the statistics. VACUUM command cleans the main database by copying its contents to a temporary database file and reloading the original database file from the copy. This eliminates free pages, aligns table data to be contiguous, and otherwise cleans up the database file structure.

System Variable Name admin-vacuum_stats
Dynamic Yes
Permitted Values Type Boolean (seconds)
Default true
Valid values true, false

Admin web interface

ProxySQL 1.4.4 embeds an HTTP web server from where it is possible to gather certain metrics.
Credentials to access the web interfaces are the same defined in admin-stats_credentials.

admin-web_enabled

If admin-web_enabled is set to true, the web server is automatically enabled.

System Variable Name admin-web_enabled
Dynamic Yes
Permitted Values Type Boolean
Default false

admin-web_port

This variable defines on which port the web server is listening.

System Variable Name admin-web_port
Dynamic Yes
Permitted Values Type Integer
Default 6080