首頁 >資料庫 >mysql教程 >修復:錯誤 1396 (HY000):MySQL 中的操作 CREATE USER 失敗?

修復:錯誤 1396 (HY000):MySQL 中的操作 CREATE USER 失敗?

WBOY
WBOY轉載
2023-08-25 14:29:191369瀏覽

修复:错误 1396 (HY000):MySQL 中的操作 CREATE USER 失败?

To fix the error, let us see how to create a user correctly. Let us create a user −

mysql> create user 'Emma'@'localhost' IDENTIFIED BY 'emma_654';
Query OK, 0 rows affected (0.00 sec)

Let us display all users along with host −##

mysql> select user,host from MySQL.user;

Let us display all users along with host −##
+------------------+-----------+
| user             |      host |
+------------------+-----------+
| Bob              |         % |
| Charlie          |         % |
| Robert           |         % |
| User2            |         % |
| mysql.infoschema |         % |
| mysql.session    |         % |
| mysql.sys        |         % |
| root             |         % |
| @UserName@       | localhost |
| Adam             | localhost |
| Adam Smith       | localhost |
| Chris            | localhost |
| David            | localhost |
| Emma             | localhost |
| Jace             | localhost |
| James            | localhost |
| John             | localhost |
| John Doe         | localhost |
| Michael          | localhost |
| Mike             | localhost |
| Robert           | localhost |
| User1            | localhost |
| am               | localhost |
| hbstudent        | localhost |
| mysql.infoschema | localhost |
| mysql.session    | localhost |
+------------------+-----------+
26 rows in set (0.00 sec)

Let us display all users along with host −##rrreee

Let us display all users along with host −##rrreeeLet us display all users along with host −# ##rrreee###這將產生以下輸出。上面建立的新使用者在下面的所有使用者清單中可見,以及主機−###rrreee###

以上是修復:錯誤 1396 (HY000):MySQL 中的操作 CREATE USER 失敗?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文轉載於:tutorialspoint.com。如有侵權,請聯絡admin@php.cn刪除