Home >Database >Mysql Tutorial >Error 1396 (HY000): Create user operation failed for '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!