【mysql问题】解决ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)

编程入门 行业动态 更新时间:2024-10-09 13:31:55

【mysql问题】解决ERROR 1045 (28000): <a href=https://www.elefans.com/category/jswz/34/1770507.html style=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

本文发布于:2024-02-06 18:49:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1750676.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Access   mysql   ERROR   localhost   password

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!