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)