-
Notifications
You must be signed in to change notification settings - Fork 6
Outdated Authentication Methods
Operational
Passwords that use the pre-4.1 hashing method (
mysql_old_password
) are less secure than passwords that use the native password hashing method and should be avoided. Pre-4.1 passwords are deprecated and support for them (including themysql_old_password
plugin) was removed in MySQL 5.7.5.
MySQL 5.7 Old Native Pluggable Authentication
In MySQL 8.0,
caching_sha2_password
is the default authentication plugin rather than `mysql_native_password.
MySQL 8.0 caching_sha2_pluggable
There are a number of suggested ways to address this but the most secure option is to set a new password for the user and manually communicate it to the user.
ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password';
You can also ensure they set a new password on first time authentication by passing in PASSWORD EXPIRE
as well (this requires them to set a new password on the first time they authenticate.
ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_temporary_password' PASSWORD EXPIRE;
ALTER USER 'user'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'new_password';
You can also ensure they set a new password on first time authentication by passing in PASSWORD EXPIRE
as well (this requires them to set a new password on the first time they authenticate.
ALTER USER 'user'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'new_temporary_password' PASSWORD EXPIRE;