ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
2016-11-07 13:24
651 查看
最近在centos7下安装mysql5.7后,登录报以下错误:
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
解决方法:
1.修改/etc/my.cnf文件,在最后一行加上
2.重启mysql
3.免密码登录mysql,输入一下命令,直接回车,不需要密码:
4.修改root密码:
5.退出,并删除/etc/my.cnf文件中的skip-grant-tables
6.重启mysql,并用新密码登录
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
解决方法:
1.修改/etc/my.cnf文件,在最后一行加上
skip-grant-tables
2.重启mysql
service mysqld restart
3.免密码登录mysql,输入一下命令,直接回车,不需要密码:
mysql -uroot -p
4.修改root密码:
user mysql; update user set authentication_string=password("123456") where user="root"; flush privileges;
5.退出,并删除/etc/my.cnf文件中的skip-grant-tables
6.重启mysql,并用新密码登录
service mysqld restart
相关文章推荐
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- 解决 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 问题
- ERROR 1045 (28000): Access denied for user'root'@'localhost'(using password:YES)最近解决方法在!
- ERROR 1045 (28000): Access denied for user'root'@'localhost'(using password:YES)
- mysql登录出现:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- 解决 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 问题
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- 解决 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 问题
- ERROR 1045 (28000): Access denied for user root@localhost (using password: YES)
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- 解决 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 问题
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)解决办法
- ERROR 1045 (28000): Access denied for user root@localhost (using password: NO/YES)
- ERROR 1045 (28000): Access denied for user ’root’@’localhost’ (using password: YES)
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- Win7下mysql root账户登录提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)解决方案
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)