标签:mysql密码重置
Mysql密码重置
■5.1修改配置文件为免授权
___________________________________________________________
[root@lab-1-C6 ~]# mysqladmin -uroot password ‘111qqq...‘ [root@lab-1-C6 ~]# mysql -uroot -p111qqq... [root@lab-1-C6 ~]# vim /etc/my.cnf [root@lab-1-C6 ~]# /etc/init.d/mysqld restart Shutting down MySQL. SUCCESS! Starting MySQL. SUCCESS! [root@lab-1-C6 ~]# mysql mysql> update user set password=password(‘111qqq...‘) where user=‘root‘; mysql> select * from user where user=‘root‘\G; [root@lab-1-C6 ~]#vim /etc/my.cnf #删除以下内容 skip-grant [root@lab-1-C6 ~]#/etc/init.d/mysqld restart [root@lab-1-C6 ~]# mysql #无法登录 ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO) [root@lab-1-C6 ~]# mysql -uroot -p111qqq...
本文出自 “抚琴煮酒” 博客,请务必保留此出处http://szk5043.blog.51cto.com/8456440/1762963
标签:mysql密码重置
原文地址:http://szk5043.blog.51cto.com/8456440/1762963