隨筆 - 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 小一敗涂地 閱讀(874) 評論(0)  編輯  收藏 所屬分類: 數據庫(oracle、mysql、sql server等)相關

          主站蜘蛛池模板: 思茅市| 师宗县| 乡宁县| 百色市| 永州市| 启东市| 工布江达县| 隆尧县| 南乐县| 乳山市| 都匀市| 富川| 二连浩特市| 策勒县| 伊春市| 象州县| 喜德县| 岳池县| 石台县| 东丰县| 涿州市| 台江县| 屏南县| 左权县| 永清县| 澄城县| 荣成市| 银川市| 垫江县| 垣曲县| 桂东县| 定边县| 奈曼旗| 大冶市| 扶风县| 公主岭市| 崇阳县| 民勤县| 延庆县| 阿瓦提县| 开鲁县|