MySQL Connector/J 5.1 through 8.0.8 is able to connect to MySQL 8.0 servers, except for accounts that authenticate with caching_sha2_password . (Connector/J 8.0.9 or higher is required to connect to caching_sha2_password  accounts.) 

Clients that use an implementation of the client/server protocol other than libmysqlclient  may need to be upgraded to a newer version that understands the new authentication plugin. For example, in PHP, MySQL connectivity usually is based on mysqlnd , which currently does not know about caching_sha2_password . Until an updated version of mysqlnd  is available, the way to enable PHP clients to connect to MySQL 8.0 is to reconfigure the server to revert to mysql_native_password  as the default authentication plugin, as previously discussed. 

If a client or connector supports an option to explicitly specify a default authentication plugin, use it to name a plugin other than caching_sha2_password . Examples: 

•Some MySQL clients support a --default-auth  option. (Standard MySQL clients such as mysql  and mysqladmin  support this option but can successfully connect to 8.0 servers without it. However, other clients may support a similar option. If so, it is worth trying it.) 

•Programs that use the libmysqlclient C API can call the mysql_options()  function with the MYSQL_DEFAULT_AUTH  option. 

•MySQL Connector/Python scripts that use the native Python implementation of the client/server protocol can specify the auth_plugin  connection option. (Alternatively, use the Connector/Python C Extension, which is able to connect to MySQL 8.0 servers without the need for auth_plugin .) 

## caching_sha2_password-Compatible Clients and Connectors 

If a client or connector is available that has been updated to know about caching_sha2_password , using it is the best way to ensure compatibility when connecting to a MySQL 8.0 server configured with caching_sha2_password  as the default authentication plugin. 

These clients and connectors have been upgraded to support caching_sha2_password : 

•The libmysqlclient  client library in MySQL 8.0 (8.0.4 or higher). Standard MySQL clients such as mysql  and mysqladmin  are libmysqlclient -based, so they are compatible as well. 

•The libmysqlclient  client library in MySQL 5.7 (5.7.23 or higher). Standard MySQL clients such as mysql  and mysqladmin  are libmysqlclient -based, so they are compatible as well. 

•MySQL Connector/C++ 1.1.11 or higher or 8.0.7 or higher. 

•MySQL Connector/J 8.0.9 or higher. 

•MySQL Connector/NET 8.0.10 or higher (through the classic MySQL protocol). 

•MySQL Connector/Node.js 8.0.9 or higher. 

•PHP: the X DevAPI PHP extension (mysql_xdevapi) supports caching_sha2_password . 

PHP: the PDO_MySQL and ext/mysqli extensions do not support caching_sha2_password . In addition, when used with PHP versions before 7.1.16 and PHP 7.2 before 7.2.4, they fail to connect with default_authentication_plugin=caching_sha2_password  even if caching_sha2_password  is not used. 

## caching_sha2_password and the root Administrative Account 

For upgrades to MySQL 8.0, the authentication plugin existing accounts remains unchanged, including the plugin for the ’root’@’localhost’  administrative account. 

