Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost'?
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.
Advertisements
