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

MySQLMySQLi Database

In the system, the root is defined by another name as well as password. Then the user is created as a root with the help of the create command. This will result in the ERROR 1396.

The query for this is given as follows −

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

After executing the above query, the following error is obtained −

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

The user can be created with another name and password successfully. This is given as follows −

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

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

raja
Published on 18-Oct-2018 13:14:52
Advertisements