Access denied for user ‘root‘@‘localhost‘ (using password: YES)"/>
【mysql问题】解决ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
MySQL登录报(Linux)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwor: YES)
[root@hadoop2 /]# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
解决
1、找到的配置文件,/etc/myf
2、找到 [mysqld]
这一项,然后在该配置项下添加 skip-grant-tables
这个配置,然后保存文件
3、重启mysql
[root@hadoop2 etc]# service mysql start
Starting MySQL...... [确定]
4、验证,重登看看
[root@hadoop2 etc]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.36 MySQL Community Server (GPL)Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>
成功,希望对大家有所帮助。
更多推荐
【mysql问题】解决ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using
发布评论