Recreating MySQL User 'jack'@'localhost' Error 1396
Question:
Despite recreating a MySQL user as root, the operation fails with error 1396. The user was previously deleted from mysql.user, but no traces remain in the table. Creating other users works successfully, but recreating 'jack' consistently fails.
Answer:
This error is a known bug in MySQL. To resolve it, follow these steps:
Assume the user exists and drop it:
DROP USER 'jack'@'localhost';
Flush MySQL privileges:
FLUSH PRIVILEGES;
Create the user:
CREATE USER 'jack'@'localhost' IDENTIFIED BY 'test123';
This workaround should recreate the 'jack' user without the error. Note that you need to replace 'jack' with the desired username and 'test123' with the actual password.
The above is the detailed content of Why Does Recreating MySQL User 'jack'@'localhost' Fail with Error 1396?. For more information, please follow other related articles on the PHP Chinese website!