诡异的 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 ...
随机推荐
- 动态规划:压缩编码;WirelessRouters;
转载请注明~ 如果有理解不到位或错误的情况,劳烦大神指正,一定感激不尽! 题目来源:CCF201612-4 压缩编码 题目的意思是: 1. 顺序给定文字中n个单词出现的频率(次数): 2. 对这n个单 ...
- MAC/Xcode简单操作命令
快捷键: command(windows) + c: 复制 command + V : 粘贴 command + x: 剪切(只在当前应用程序内有效) 在mac系统下表示剪切功能: 先command ...
- Mac 下配置Nginx安装环境配置详细说明
环境信息: Mac OS X 10.11.1 Homebrew 0.9.5 正文 一.安装 Nginx 1.终端执行: ? 1 2 brew search nginx brew install ng ...
- redis的五种存储类型的具体用法
String 类型操作 string是redis最基本的类型,而且string类型是二进制安全的.意思是redis的string可以包含任何数据.比如jpg图片或者序列化的对象 $redis-> ...
- 20172306 《Java程序设计与数据结构》第七周学习总结
20172306<Java程序设计>第七周学习总结 教材学习内容总结 这一章的标题是继承.主要学习了有关继承的相关知识.其中在这五节中,我学到了以下几点: 1.继承主要表达的是" ...
- 可读性很强的C语言的函数指针定义
通常C/C++程序里面要用到大量的指针,其语法非常难以阅读.比如下面的vp指针类型: #include <iostream> using namespace std; typedef vo ...
- linux学习第二天 (Linux就该这么学)
2018年11月10日,今天是学习的第二天 今天学习了安装vmware workstation12的安装及怎么安装 redhat7系统,在新建虚拟机时注意要选择“稍后安装操作系统”要vmwark wo ...
- nginx 域名(虚拟)部署nodejs项目
首先说下我的情况,Windows+mongodb开发的简单nodejs 小博客系统, 配置部署到centos7 nginx下,mongodb还是在我Windows机器下, 1.Linux安装node. ...
- Squares of a Sorted Array LT977
Given an array of integers A sorted in non-decreasing order, return an array of the squares of each ...
- 原生js的dom操作
父节点parentNode 第一个子节点 只会获取到元素节点 firstElementChild ★★★★★ 第一个子节点 (如果有文本节点将会获取到文本节点) firstChild 最 ...