返回顶部

MYSQL创建数据库报错 “ERROR 1396 (HY000): Operation CREATE USER failed for 'wordpress'@'10.0.0.%'”

MYSQL创建数据库报错 “ERROR 1396 (HY000): Operation CREATE USER failed for 'wordpress'@'10.0.0.%'”

 

 

 

因为之前创建过用户,并删除WordPress用户,所以刷新一下

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> create user wordpress@'10.0.0.%' identified by '123456';
ERROR 1396 (HY000): Operation CREATE USER failed for 'wordpress'@'10.0.0.%'

mysql> select user,host from user;
+------------------+-----------+
| user                  | host |
+------------------+-----------+
| mysql.infoschema | localhost |
| mysql.session       | localhost |
| mysql.sys              | localhost |
| root       | localhost |
+------------------+-----------+
4 rows in set (0.00 sec)

 

但还是相同报错,再次执行删除用户命令,成功创建

mysql> drop user 'wordpress'@'10.0.0.%';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> select user,host from user;
+------------------+-----------+
| user              |         host |
+------------------+-----------+
| wordpress     |  10.0.0.% |
| mysql.infoschema | localhost |
| mysql.session | localhost |
| mysql.sys       | localhost |
| root                | localhost |
+------------------+-----------+
5 rows in set (0.01 sec)

 

posted @ 2020-11-28 13:03  九尾cat  阅读(672)  评论(0编辑  收藏  举报