Skip to main content

ProxySQL and MySQL 8.0

Overview

ProxySQL fully supports MySQL 8.0, though certain limitations exist in versions prior to 2.0.2.

Key Limitations (Pre-2.0.2)

Authentication Plugin Changes

MySQL 8.0.4+ switched the default authentication from mysql_native_password to caching_sha2_password. ProxySQL versions prior to 2.0.2 do not support the newer plugin. Servers must be configured to use mysql_native_password when operating with older ProxySQL versions.

Client Connection Requirements

ProxySQL does not accept connections (frontend connections and connections to Admin) if the client tries to use the caching_sha2_password authentication plugin prior to ProxySQL version 2.0.2.

Clients using MySQL 8.0's libmysqlclient must explicitly specify mysql_native_password. Configuration example:

mysql --default-auth=mysql_native_password -h 127.0.0.1 -P6032 -u admin -padmin

Alternatively, add to my.cnf:

[mysql]
default-auth=mysql_native_password

Post-2.0.2 Considerations

For backends using caching_sha2_password: passwords in mysql_users.password must be cleartext (unhashed), and admin-hash_passwords must equal false.

Collation Issues

Before 2.0.16/2.1.1: ProxySQL incorrectly converted client-specified utf8mb4_0900_ai_ci collation to utf8mb4_general_ci for backend connections.

From 2.0.16/2.1.1 onward: Proper collation handling is implemented. The backend uses the client's specified collation unless unsupported.