问题描述:

用户已建,权限已赋予。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. 使用jquery刷新当前页面

    div的局部刷新 $(".dl").load(location.href+" .dl"); 全页面的刷新方法 window.location.reload()刷 ...

  2. MVC学习(四)几种分页的实现(1)

     这里,我使用的是Code-First,MVC3. 我们在数据库里建一个表MyTestPages,只有一个整型字段Id. 在写一个Model类MyTestPages,代码如下 public class ...

  3. 线特征---LBD算法(三)

    上一节主要是介绍LSD算法理论,这节主要是介绍LBD算法. 参考文章:An efficient and robust line segment matching approach based on L ...

  4. Django中使用django_debug_toolbar

    一 概述 django_debug_toolbar 是django的第三方工具包,给django扩展了调试功能. 包括查看执行的sql语句,db查询次数,request,headers,调试概览等. ...

  5. C# 一个数组未赋值引发的错误

    在电脑前又是一天,后来脑子也糊里糊涂,可能是基础还不牢固,设置断点,找了找问题才发现数组定义出了问题, 我是这样定义数组的,string[] auths ; string auths=new stri ...

  6. Android.Tools.Summary

    Android平台上工具的总结 每个工具的详细使用和深入理解参考每个工具相关的blog. 1. Android SDK中提供的工具 http://developer.android.com/tools ...

  7. java中的内存模型

    概述 Java平台自动集成了线程以及多处理器技术,这种集成程度比Java以前诞生的计算机语言要厉害很多,该语言针对多种异构平台的平台独立性而使用的多线程技术支持也是具有开拓性的一面,有时候在开发Jav ...

  8. UI设计教程学习分享:APP布局

    一.宫格布局 这种APP信息布局方式也是我们目前最常见的一种方式,也是符合用户习惯和黄金比例的设计方式,最知名的就是锤子手机的界面设计.锤子手机界面设计欣赏知名的APP设计采用的九宫格.六宫格等方式布 ...

  9. option_match

    //与match区别:如果没有匹配到,返回NULLCREATE (olive:Person {name:'Olive Stone'}),(charlie:Person {name:'Charlie S ...

  10. 隐马尔科夫_HMM

    有向图 抽象:λ代表输入:输入一个句子,λi表示句子中的每个字 O代表输出:[B词首/M词中/E词尾/S单独成词] max=maxP(O1 O2 On/ λ1 λ2 λn) 假设: (1)当前观察值只 ...