mysqlERROR1045(28000):Accessdeniedforuser(usingpassword:NO)解決方法:Step1:C:\ProgramFiles\MySQL\MySQLServer5.0\bin>mysql-uroot-pEnterpassword:******WelcometotheM" />

日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

ERROR 1045 (28000): Access denied for user '

系統 2387 0

剛使用mysql, 就老是碰到這個問題,真是郁悶, 終于找到原因..
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql
ERROR 1045 (28000): Access denied for user (using password: N
O)


解決方法:
Step 1:

C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -u root -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 28 to server version: 5.0.24a-community-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

Step 2:
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql
mysql>status

正常使用....

--------------------------------------------------

我的系統是ubuntu6.06,最近新裝好的mysql在進入mysql工具時,總是有錯誤提示:
# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

使用網上介紹的方法修改root用戶的密碼:
# mysqladmin -uroot -p password 'newpassword'
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'

現在終于被我找到了解決方法,如下(請先測試方法三,謝謝!):
方法一:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit

# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: <輸入新設的密碼newpassword>

mysql>


方法二:
直接使用/etc/mysql/debian.cnf文件中[client]節提供的用戶名和密碼:
# mysql -udebian-sys-maint -p
Enter password: <輸入[client]節的密碼>
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit

# mysql -uroot -p
Enter password: <輸入新設的密碼newpassword>

mysql>


方法三:
這種方法我沒有進行過測試,因為我的root用戶默認密碼已經被我修改過了,那位有空測試一下,把結果告訴我,謝謝!!
# mysql -uroot -p
Enter password: <輸入/etc/mysql/debian.cnf文件中[client]節提供的密碼>

至此,困惑多時的問題解決了!

Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1683765

ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: N)


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 伊金霍洛旗| 辉南县| 长岭县| 临湘市| 临猗县| 雅江县| 琼结县| 镇安县| 四会市| 新郑市| 九台市| 乌恰县| 长沙县| 正蓝旗| 黔江区| 新沂市| 临洮县| 仁怀市| 高淳县| 德保县| 特克斯县| 蒙阴县| 澳门| 南城县| 仪陇县| 霍林郭勒市| 永修县| 玉林市| 荣昌县| 信阳市| 忻城县| 应城市| 光山县| 汾西县| 阿巴嘎旗| 霸州市| 大化| 贺州市| 霍林郭勒市| 平远县| 阿鲁科尔沁旗|