Home > Database > Mysql Tutorial > body text

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

王林
Release: 2023-08-25 19:17:11
forward
2400 people have browsed it

错误 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';
Copy after login

After executing the above query, the following error occurred -

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

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)
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!