诡异的 ERROR 1045 (28000): Access denied for user 错误
问题描述:
用户已建,权限已赋予。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 错误的更多相关文章
- 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 ...
- 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 ...
- 升级到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' ...
- 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)) 修改: # ...
- 安装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 ...
- 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 ' ...
- 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 ...
- Linux 下,mysql数据库报无法登陆错误:ERROR 1045 (28000): Access denied for use
今天在别人的服务器上登录mysql发现无法登陆(Mysql别人实现安装好的) 密码和用户名都是正确的,但登录后报如下错误: ERROR 1045 (28000): Access denied for ...
- 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 ...
随机推荐
- Debug和汇编编译器masm对指令的不同处理
我们在Debug和源程序中写入同样形式的指令 : "mov al,[0]","mov bl,[1]","mov cl,[2]"," ...
- spring boot 访问项目时加项目名称
pringboot 项目一般直接地址加端口就可以访问了,不像放在tomcat里面还需要加上项目名. 现在,想访问的时候加上项目名用来区分,只要在配置文件里面加上 server.context-path ...
- (转)Android EditText限制输入字符的5种实现方式
最近项目要求限制密码输入的字符类型, 例如不能输入中文. 现在总结一下EditText的各种实现方式, 以比较各种方法的优劣. 第一种方式: 设置EditText的inputType属性,可以 ...
- C# mysql 插入数据,中文乱码
用C#操作mysql时, 插入数据中文都是乱码,只显示问号,数据库本身使用的是utf-8字符. 网上百度一下有两种解决办法: 一种是在执行语句前面设置,如:MySQLCommand mCommand ...
- (转)Oracle 使用 DBLINK详解
DBLINK详解 1.创建dblink语法: CREATE [PUBLIC] DATABASE LINK link CONNECT TO username IDENTIFIED BY password ...
- andorid 帧布局
framelayout.xml帧布局 <?xml version="1.0" encoding="utf-8"?> <FrameLayout ...
- java mina框架使用
1.目前为止,看到写mina最清晰的一篇博客:https://my.oschina.net/ielts0909/blog/85946! 2.官网的开发文档:http://mina.apache.org ...
- BZOJ1051或洛谷2341 [HAOI2006]受欢迎的牛
BZOJ原题链接 洛谷原题链接 显然在一个强连通分量里的奶牛都可以相互喜欢,所以可以用\(tarjan\)求强连通并缩点. 要求明星奶牛必须被所有人喜欢,显然缩点后的图必须满足只有一个点没有出度,因为 ...
- 洛谷4054 [JSOI2009]计数问题
原题链接 二维树状数组模板题. 对每一种颜色开一棵二维树状数组统计即可. #include<cstdio> using namespace std; const int N = 310; ...
- nodejs 数字字节转换操作
function number2Bytes(i) { var arr = new Int32Array(1); arr[0] = 0; var buf = Buffer.from(arr.buffer ...