博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Mysql 问题篇 --- Access denied for ERROR 1045 (28000)
阅读量:7011 次
发布时间:2019-06-28

本文共 3582 字,大约阅读时间需要 11 分钟。

hot3.png

issue: Access denied for ERROR 1045 (28000)

[root@jt30dmz001tc001 ~]# mysql -u root -ppass Access denied for ERROR 1045 (28000):user 'root'@'localhost' (using password: YES)#way 1#step 1: Start the MySQL server instance or daemon with the --skip-grant-tables option (security setting).mysqld --skip-grant-tables#step 2: $ mysql -u root mysql$mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';$mysql> FLUSH PRIVILEGES;#step 3:$ /etc/init.d/mysql restart####way 2[root@jt30dmz001tc001 ~]# mysql -u root -ppass -h 0.0.0.100Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 5Server version: 5.5.38 MySQL Community Server (GPL)Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>mysql> select host, user, password from user;+------------------------------+------+-------------------------------------------+| host                         | user | password                                  |+------------------------------+------+-------------------------------------------+| %                            | root | *196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7 || jt30dmz001tc001.qa.webex.com | root |                                           || 127.0.0.1                    | root |                                           || ::1                          | root |                                           || localhost                    | root |                                           || jt30dmz001tc001.qa.webex.com |      |                                           |+------------------------------+------+-------------------------------------------+6 rows in set (0.00 sec)mysql> update user set password = PASSWORD('pass') where user = 'root' and host = 'localhost';Query OK, 1 row affected (0.00 sec)Rows matched: 1  Changed: 1  Warnings: 0mysql> select host, user, password from user;+------------------------------+------+-------------------------------------------+| host                         | user | password                                  |+------------------------------+------+-------------------------------------------+| %                            | root | *196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7 || jt30dmz001tc001.qa.webex.com | root |                                           || 127.0.0.1                    | root |                                           || ::1                          | root |                                           || localhost                    | root | *196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7 || jt30dmz001tc001.qa.webex.com |      |                                           |+------------------------------+------+-------------------------------------------+6 rows in set (0.00 sec)mysql> commit;Query OK, 0 rows affected (0.00 sec)mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)[root@jt30dmz001tc001 ~]# mysql -u root -ppassWelcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 15Server version: 5.5.38 MySQL Community Server (GPL)Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>

转载于:https://my.oschina.net/wangbinbin0326/blog/483511

你可能感兴趣的文章
QQ-weiyun(微云)-云储存
查看>>
微信公众帐号开发教程第3篇-开发模式启用及接口配置(转)
查看>>
第 12 章 Other Web Server
查看>>
.NET项目web自动化测试实战——Selenium 2.0
查看>>
[LeetCode] Split Concatenated Strings 分割串联字符串
查看>>
Asp.Net SignalR - 持久连接类
查看>>
11.8. NAT
查看>>
PowerShell调用jira rest api实现jira统计自动化
查看>>
Git 时间,将代码托管到GitHub 上
查看>>
火车票秒杀攻略
查看>>
关于Asp.Net中FileUpload控件属性PostedFile.ContentType的提示
查看>>
Laravel5做权限管理
查看>>
Spring 通过Java代码装配bean
查看>>
架构重构-好文分享
查看>>
使用shell批量生成数据整合式迁移的脚本
查看>>
[20151021]理解dbms_xplan.display_cursor的format参数all.txt
查看>>
Unicode字符编码标准
查看>>
云计算就像是产业链的重新组合
查看>>
第三代北斗芯片发布 2020年北斗计划向全球提供服务
查看>>
阿里巴巴集团CTO王坚:云计算让理想平等
查看>>