ubuntu下 mysql安装以后无法登陆的的解决方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost'))...
生活随笔
收集整理的這篇文章主要介紹了
ubuntu下 mysql安装以后无法登陆的的解决方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost'))...
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
?
1. 刪除mysql
?
?
sudo apt-get autoremove --purge mysql-server-5.0
?
sudo apt-get remove mysql-server
sudo apt-get autoremove mysql-server
sudo apt-get remove mysql-common?
?
2. 清理殘留數(shù)據(jù) dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P?
?
3. 安裝 mysql
?
?
sudo apt-get install mysql-server sudo apt-get install mysql-client 4 解決普通用戶無法登錄的問題: sudo mysql -u root -p select user, plugin from mysql.user; update mysql.user set authentication_string=PASSWORD('newPwd'), plugin='mysql_native_password' where user='root'; flush privileges; exit 重新進(jìn)入
轉(zhuǎn)載于:https://www.cnblogs.com/Lin-Yi/p/9276710.html
總結(jié)
以上是生活随笔為你收集整理的ubuntu下 mysql安装以后无法登陆的的解决方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost'))...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: grep 匹配制表符 和 换行符
- 下一篇: 在腾讯云上安装mysql遇到的问题