Database Reference
In-Depth Information
Solution
Assign yourself a new password.
Discussion
If the MySQL administrator has expired your password, MySQL will let you connect,
but not do much of anything else:
% mysql --user=cbuser --password
Enter password: ******
mysql> SELECT CURRENT_USER();
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
If you see that message, reset your password so that you can work normally again:
mysql> SET PASSWORD = PASSWORD('my-new-password');
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT CURRENT_USER(); -- now you can work again
+------------------+
| CURRENT_USER() |
+------------------+
| cbuser@localhost |
+------------------+
1 row in set (0.00 sec)
Technically, MySQL does not require a new password to replace an expired password,
so you can assign yourself your current password to unexpire it. The exception is that
if the password policy has become more restrictive and your current password no longer
satisfies it, a stronger password must be chosen.
For more information about changing your password, see Recipe 23.6 .
23.8. Finding and Fixing Insecure Accounts
Problem
Your MySQL installation includes accounts that have no password or use deprecated
and insecure password hashing.
Solution
Upgrade those accounts to use a better password hashing method.
Discussion
Security is important and MySQL has improved user account security over time. An
early change occurred way back in MySQL 4.1, with the introduction of a better pass‐
Search WWH ::




Custom Search