MySql-Error: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
标签(空格分隔): mysql
我的系统是Ubuntu14.6, mysql的用户和密码都忘了,以下是解决的办法
msyqld_saft方式找回密码
1 service mysql stop2 mysqld_safe --user=mysql --skip-grant-tables --skip-networking &3 mysql -uroot -pmysql4 UPDATE user SET Password=PASSWORD('newpassword') where USER='root';5 FLUSH PRIVILEGES;6 quit7 service mysql restart8 mysql -uroot -p newpassword