Error 1396 (HY000): Operation create user failed for ‘MySQL’ @’localhost ‘
reason:
Delete MySQL users directly use delete from mysql.user where user like ‘%mysql%’;
Then create MySQL again and report the user’s error;
solve:
Check to see if there is this user
mysql> select distinct user from mysql.user;
+-------+
| user |
+-------+
| root |
+-------+
1 rows in set (0.00 sec)
Using drop to delete users
mysql> drop user 'mysql'@'localhost';
After deleting, you can re create the user. If you report the same error, you may encounter a MySQL bug and need to refresh the permissions
mysql> flush privileges;
Then recreate the user
mysql> create user 'mysql'@'localhost' identified by 'mysql';
Read More:
- Linux-mysql8.0 password reset problem – error 1396 (HY000): Operation alter user failed for ‘root’ @’localhost ‘
- Error 1396 (HY000): Operation create user failed for ‘xxx’ @’xxx ‘
- Solve MySQL error 1698 (28000): access denied for user ‘root’ @’localhost ‘
- MySQL startup problem (ERROR 1045 (28000): Access denied for user’ODBC’@’localhost’ (using password: NO))
- Mysql Error:The user specified as a definer (‘mysql.infoschema‘@‘localhost‘) does not exist
- ERROR 2002 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
- Error 2003 (HY000): can’t connect to MySQL server on ‘localhost’ (10061)
- Error 1045 (28000) access denied for user ‘root’ @’localhost ‘appears in MySQL under Windows system
- MySQL connection error access denied for user ‘root’ @ ‘localhost‘
- ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mysql’
- [resolved] superset failed to create admin user: error! User already exists user or attributeerror: ‘nonetype’‘
- SQL exception handling – MySQL error 1005 (HY000): can’t create table ‘TMP’ (errno: 13)
- How to Fix failed to Connect to MySQL at localhost:3306 with user root
- About error 1005 (HY000) in MySQL: can’t create table ‘_______ ‘(errno: 150) fool’s plan
- MYSQL login error: mysqladmin: connect to server at’localhost’ failed
- MySQL – ERROR 1146 (42S02): Table ‘mysql.user’ doesn’t exist
- Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: no)
- Solution to “550 create directory operation failed” in FTP operation file
- Error 1045 (28000): solution to access denied for user ‘root’ @’localhost ‘(using password: no)
- Idea access denied for user ‘xxx’ @ ‘localhost’ solution