隨筆 - 0, 文章 - 264, 評論 - 170, 引用 - 0
          數據加載中……

          ERROR 1045 (28000): Access denied for user 'openfire'@'localhost' (using password: YES)

          mysql -u root -p

          Then I created a new user bill with host %

          CREATE USER 'bill'@'%' IDENTIFIED BY 'passpass';

          Granted all the privileges to user bill:

          grant all privileges on . to 'bill'@'%' with grant option;

          Then I exit from root user and try to login with bill:

          mysql -u bill -p

          entered the correct password and got this error:

          ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)


          錯誤原因:
          mysql.user表中存在一條user=''的記錄,導致登錄時首先匹配到這條記錄,所以無法登錄。

          解決辦法:
          刪除掉這條用戶記錄,即操作語句:DELETE FROM mysql.user where user='';

          posted on 2014-11-08 14:15 小一敗涂地 閱讀(870) 評論(0)  編輯  收藏 所屬分類: 數據庫(oracle、mysql、sql server等)相關

          主站蜘蛛池模板: 亚东县| 曲水县| 成都市| 民和| 台前县| 南涧| 方山县| 柳河县| 溧水县| 东至县| 巴马| 西贡区| 江口县| 沙坪坝区| 五台县| 夹江县| 连城县| 子洲县| 辉县市| 五原县| 宜黄县| 海原县| 枣强县| 夏邑县| 噶尔县| 大同市| 沈阳市| 崇明县| 聊城市| 濮阳市| 宁乡县| 永善县| 泾川县| 澎湖县| 东乌珠穆沁旗| 平遥县| 吐鲁番市| 德令哈市| 四川省| 嘉禾县| 长垣县|