首頁  >  文章  >  資料庫  >  錯誤 1396 (HY000):「root」@「localhost」的建立使用者操作失敗?

錯誤 1396 (HY000):「root」@「localhost」的建立使用者操作失敗?

王林
王林轉載
2023-08-25 19:17:112374瀏覽

错误 1396 (HY000):“root”@“localhost”的创建用户操作失败?

在系統中,root 由另一個名稱和密碼定義。那麼用戶就是 借助 create 命令以 root 身分建立。這將導致錯誤 1396。

對此的查詢如下 -

mysql> create user 'root'@'localhost' identified by 'root123';

執行上述查詢後,出現以下錯誤 -

ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost'

可以使用其他名稱和密碼成功建立使用者。這被給出為 如下 -

mysql> create user 'John'@'localhost' identified by 'john123';
Query OK, 0 rows affected (0.14 sec)

現在,已經使用給定的密碼成功建立了使用者 John。

以上是錯誤 1396 (HY000):「root」@「localhost」的建立使用者操作失敗?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

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