天天看點

Mysql資料庫服務啟動了,但無法登入資料

問題:#service mysqld status 

 資料庫服務能正常啟動,但無法連接配接上資料庫,實際上是密碼問題。

解決方式:重新設定密碼

# service mysqld stop

# mysqld_safe --user=mysql --skip-grant-tables--skip-networking & 

# service mysqld start

#mysql -u root 

mysql> UPDATE user SETPassword=PASSWORD(’newpassword’) where USER=’root’; 

mysql> FLUSH PRIVILEGES; 

mysql> quit 

# mysql -u root  -p 

Enter password: <'輸入剛才的新設的密碼'> 

mysql> 

上一篇: ACS Lab

繼續閱讀