For new MySQL 8.0 installations, when you initialize the data directory (using the instructions at Section 2.10.1, “Initializing the Data Directory” ), the ’root’@’localhost’  account is created, and that account uses caching_sha2_password  by default. To connect to the server following data directory initialization, you must therefore use a client or connector that supports caching_sha2_password . If you can do this but prefer that the root  account use mysql_native_password  after installation, install MySQL and initialize the data directory as you normally would. Then connect to the server as root  and use ALTER USER  as follows to change the account authentication plugin and password: 

ALTER USER ’root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ’ password ’; 

If the client or connector that you use does not yet support caching_sha2_password , you can use a modified data directory-initialization procedure that associates the root  account with mysql_native_password  as soon as the account is created. To do so, use either of these techniques: 

•Supply a --default-authentication-plugin=mysql_native_password  option along with -- initialize  or --initialize-insecure . 

•Set default_authentication_plugin  to mysql_native_password  in an option file, and name that option file using a --defaults-file  option along with --initialize  or --initialize- insecure . (In this case, if you continue to use that option file for subsequent server startups, new accounts are created with mysql_native_password  rather than caching_sha2_password  unless you remove the default_authentication_plugin  setting from the option file.) 

## caching_sha2_password and Replication 

In replication scenarios for which all servers have been upgraded to MySQL 8.0.4 or higher, replica connections to source servers can use accounts that authenticate with caching_sha2_password . For such connections, the same requirement applies as for other clients that use accounts that authenticate with caching_sha2_password : Use a secure connection or RSA-based password exchange. 

To connect to a caching_sha2_password  account for source/replica replication: 

•Use any of the following CHANGE MASTER TO  options: 

MASTER_SSL = 1 GET_MASTER_PUBLIC_KEY = 1 MASTER_PUBLIC_KEY_PATH=’ path to RSA public key file ’ 

•Alternatively, you can use the RSA public key-related options if the required keys are supplied at server startup. 

To connect to a caching_sha2_password  account for Group Replication: 

•For MySQL built using OpenSSL, set any of the following system variables: 

SET GLOBAL group_replication_recovery_use_ssl = ON; SET GLOBAL group_replication_recovery_get_public_key = 1; SET GLOBAL group_replication_recovery_public_key_path = ’ path to RSA public key file ’; 

•Alternatively, you can use the RSA public key-related options if the required keys are supplied at server startup. 

## Configuration Changes 

• Incompatible change : A MySQL storage engine is now responsible for providing its own partitioning handler, and the MySQL server no longer provides generic partitioning support. InnoDB  and NDB  are the only storage engines that provide a native partitioning handler that is supported in MySQL 8.0. A 

