1. 程式人生 > >ubuntu下 mysql安裝以後無法登陸的的解決方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost'))

ubuntu下 mysql安裝以後無法登陸的的解決方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost'))

sta mysql安裝 nat where 數據 move sel 方法 client


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. 清理殘留數據 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 重新進入

ubuntu下 mysql安裝以後無法登陸的的解決方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost'))