mysql> select user,host from mysql.user;
+------------------+-----------+
| user | host |
+------------------+-----------+
| root | 127.0.0.1 |
| root | ::1 |
| debian-sys-maint | localhost |
| developer | localhost |
| jack | localhost |
| root | localhost |
| root | rebuild |
+------------------+-----------+
7 rows in set (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| wpdatabase |
+--------------------+
4 rows in set (0.00 sec)
mysql> CREATE USER [email protected];
ERROR 1396 (HY000): Operation CREATE USER failed for 'wpuser'@'localhost'
爲什麼不能在mysql中創建新用戶?用戶wpuser
不在表user
中。 我neved使用的數據庫,所以任何人都可以幫助我如何創建一個新的用戶?爲什麼不能在mysql中創建一個新用戶?
不,這不是密碼問題(123456是mysql數據庫的關鍵)。
mysql> CREATE USER 'wpuser'@'localhost' IDENTIFIED BY '123456';
ERROR 1396 (HY000): Operation CREATE USER failed for 'wpuser'@'localhost'
它就是這麼奇怪,請繼續。
爲什麼CREATE USER [email protected];
不能; CREATE USER [email protected];
可以嗎?