Follow the instructions below to set the default authentication plug-in to mysql_native_password or Legacy Password Encryption method.
The mysql_native_password authentication plugin is deprecated as of MySQL 8.0.34, disabled by default in MySQL 8.4, and removed as of MySQL 9.0.0.
Linux
You can change the default user password authentication plug-in after MySQL 8.0 installation.
Stop the MySQL server.
- Open one of the my.cnf options files, and add the following entry:
[mysqld] mysql_native_password=ONFor more information, see Using Option Files in the MySQL 8.0 Reference Manual.
Restart the MySQL server.
Note:After you restart MySQL,
mysql_native_passwordwill be the default authentication plug-in. To verify which users are using themysql_native_passwordauthentication plug-in, execute the following query:SELECT user, Plugin FROM mysql.user;
Windows
You can change the default user password authentication plug-in during or after MySQL 8.0 installation.
- During MySQL Installation or Upgrade
When installing or upgrading to MySQL 8.0 using the package installer, select Use Legacy Authentication Method (Retain MySQL 5.x Compatibility) in the Authentication Method step.
For more information, see the following MySQL documentation:
- After MySQL Installation
You can change the default user password authentication plug-in after you have installed MySQL 8.0.
Stop the MySQL server.
- Open one of the my.ini options files, and add the following entry:
[mysqld] mysql_native_password=ONFor more information, see Using Option Files in the MySQL 8.0 Reference Manual.
- Restart the MySQL server.Note:
After you restart MySQL,
mysql_native_passwordwill be the default authentication plug-in. To verify which users are using themysql_native_passwordauthentication plug-in, execute the following query:SELECT user, Plugin FROM mysql.user;