Home >Database >Mysql Tutorial >Error 1396 (HY000): Create user operation failed for 'root'@'localhost'?

Error 1396 (HY000): Create user operation failed for 'root'@'localhost'?

王林
王林forward
2023-08-25 19:17:112492browse

错误 1396 (HY000):“root”@“localhost”的创建用户操作失败?

In the system, root is defined by another name and password. Then the user is Create as root with the help of create command. This will result in error 1396.

The query for this is as follows -

mysql> create user 'root'@'localhost' identified by 'root123';

After executing the above query, the following error occurred -

ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost'

Users can be successfully created with other names and passwords. This is given as as follows -

mysql> create user 'John'@'localhost' identified by 'john123';
Query OK, 0 rows affected (0.14 sec)

Now, the user John has been successfully created with the given password.

The above is the detailed content of Error 1396 (HY000): Create user operation failed for 'root'@'localhost'?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete