mysql 1045

1、sudo gedit /etc/my.cnf

2、加入

skip-grant-tables

3、直接登录,输密码时回车

mysql -u root -p

4、修改密码

use mysql;

update mysql.user set authentication_string=password('zhuxiaoyong1212') where user='root' ;

5、退出重启mysql

sudo service mysql restart;

猜你喜欢

转载自www.cnblogs.com/judes/p/11810628.html
今日推荐