问题描述:

用户已建,权限已赋予。long long ago这个用户是可以正常访问的,但是今天它就不能访问了。报错如下:

ERROR 1045 (28000): Access denied for user 'lf'@'172.17.215.11' (using password: YES)

排障过程:

select user,host,password  from mysql.user;
….
| lf| localhost | *5A4CAF734551B5347FEC1171CEB89D503693C1B4 |
+--------------+---------------+-------------------------------------------+
select password(‘LF98$xxi’);
+-------------------------------------------+
| password('LF98$xxi') |
+-------------------------------------------+
| *5A4CAF734551B5347FEC1171CEB89D503693C1B4 |
+-------------------------------------------+
1 row in set (0.05 sec)

但是登录就是报错

[root@vhost02 ~]# mysql -ulf -pLF98$xxi
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'lf'@'localhost' (using password: YES)

难道是权限没有刷新?

[root@vhost02 ~]# mysql -uroot -p
...
mysql>flush privileges;

重新登录仍然失败。。。

最终解决方式:

就在小编半晕半醒之间忽然灵光一现,用户名和密码分开输入吧,于是:

[root@vhost02 ~]# mysql -ulf -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 180
Server version: 5.6.25-log MySQL Community Server (GPL)
Copyright (c) 2000, 2015, 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>

成功登录了。原因居然是密码里含有$符号。特殊字符需要慎用,用不好就把自己给坑了。不过密码有$符号,并不影响它在脚本,程序里的使用。$的特殊性应该和系统命令有关。

诡异的 ERROR 1045 (28000): Access denied for user 错误的更多相关文章

  1. Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    案例环境: 操作系统 :Red Hat Enterprise Linux Server release 5.7 (Tikanga) 64 bit 数据库版本 : Mysql 5.6.19 64 bit ...

  2. MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的真正原因

    在博客Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N ...

  3. 升级到macOS 10.12 mysqlb报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    系统升级到macOS 10.12后启动mysql后,在终端输入mysql 报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' ...

  4. mysql 链接失败(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)) 修改: # ...

  5. 安装mysql因为/tmp权限不足而导致ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)的解决方案

    本机是centos 6.5  安装的mysql是5.1的版本. 在安装mysql之后,第一次启动mysql服务的时候,需要/tmp有777(rwxrwxrwx)的权限,然而楼主的/tmp是755(rw ...

  6. MySQL5.5出面ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)问题的解决办法

    问题描述 安装完MySQL5.5数据库,使用Navicat Premium以及命令窗口连接数据库都报以下错误: ERROR 1045 (28000): Access denied for user ' ...

  7. MySQL学习笔记——ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Enter password: E ...

  8. Linux 下,mysql数据库报无法登陆错误:ERROR 1045 (28000): Access denied for use

    今天在别人的服务器上登录mysql发现无法登陆(Mysql别人实现安装好的) 密码和用户名都是正确的,但登录后报如下错误: ERROR 1045 (28000): Access denied for ...

  9. 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 2013 (HY00 ...

随机推荐

  1. mysql lost connection to server during query

    vim /etc/mysql/mysql.conf.d/mysqld.cnf [mysqld]#3600000/1000=3600秒=1小时 wait_timeout =3600000#2G缓冲max ...

  2. js的RegExp

    正则表达式是一种用来匹配字符串的强有力的武器.它的设计思想是用一种描述性的语言来给字符串定义一个规则,凡是符合规则的字符串,我们就认为它“匹配”了,否则,该字符串就是不合法的. 所以我们判断一个字符串 ...

  3. andorid 列表视图 ListView 之ArrayAdapter

    activity_ui3.xml <?xml version="1.0" encoding="utf-8"?> <ListView xmlns ...

  4. iOS 3D Touch功能

    新的触摸体验——iOS9的3D Touch 一.引言 在iphone6s问世之后,很多果粉都争先要体验3D Touch给用户带来的额外维度上的交互,这个设计之所以叫做3D Touch,其原理上是增加了 ...

  5. Python之路(第五篇) Python基本数据类型集合、格式化、函数

    一.变量总结 1.1 变量定义 记录某种状态或者数值,并用某个名称代表这个数值或状态. 1.2 变量在内存中的表现形式 Python 中一切皆为对象,数字是对象,列表是对象,函数也是对象,任何东西都是 ...

  6. SPring中quartz的配置(可以用实现邮件定时发送,任务定时执行,网站定时更新等)

    http://www.cnblogs.com/kay/archive/2007/11/02/947372.html 邮件或任务多次发送或执行的问题: 1.<property name=" ...

  7. file-downloader相关问题

    2017-05-24 file-downloader框架中,如果你想用FileDownloader中的createAndStart(String url, String saveDir, String ...

  8. Vuejs2.0之异步跨域请求

    Vuejs由1.0更新到了2.0版本.HTTP请求官方也从推荐使用Vue-Resoure变为了axios.接下来我们来简单地用axios进行一下异步请求.(阅读本文作者默认读者具有使用npm命令的能力 ...

  9. 【转载】 Jointwave零延时视频传输for FPGA/ASIC进入军工领域

    半导体知识产权H.264/H.265 硅IP核供应商Jointwave公司的发布了一系列视频编解码RTL IP核,已经成功应用于军事工业领域的指挥作战,无人机UAV控制,航空和航天摄像机,视频记录黑匣 ...

  10. canvas 实现赛车小游戏

    一:样式 <style> #btn{ width: 60px; height: 30px; line-height: 30px; background: #7EC0EE; border: ...