您好,登錄后才能下訂單哦!
環(huán)境:redhat 5.7 安裝了mysql 5.0
安裝完mysql之后啟動(dòng)成功,但是使用mysql -uroot -p登錄是,密碼錯(cuò)誤,確定沒有設(shè)置過密碼
出錯(cuò)提示:Access denied for user 'root'@'localhost' (using password : No)
解決辦法如下:
1.先關(guān)閉mysql服務(wù)
xiaopeng# /etc/init.d/mysqld stop
2.輸入操作命令
xiaopeng# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3.連接mysql
xiaopeng# mysql -uroot mysql
mysql> update user set Password=PASSWORD('newpassword') where USER='root';
mysql> flush PRIVILEGES;
mysql> quit
4.重啟mysql服務(wù)
xiaopeng# /etc/init.d/mysqld restart
xiaopeng# mysql -uroot -p
Enter password:<newpassword>
更多資源請?jiān)L問www.arppinging.com
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。