【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)
解决方法:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root' and host='root' or host='localhost';//把空的用户密码都修改成非空的密码就行了。
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysqld restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
【Error】 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)的更多相关文章
- 【转载】重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwor ...
- 解决ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)【亲测有效】
文件转自:https://blog.csdn.net/hua1011161696/article/details/80666025 问题:(MySQL 5.6社区版windows版) 忘记密码或其他一 ...
- 【MySQL】ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
问题现象: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 拒绝访问root用户 ...
- mysql安装在centos7报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
原文链接:http://blog.csdn.net/kuluzs/article/details/51924086 [问题]:mysql版本:5.7.13 首次在centos下安装MySQL,客户端连 ...
- 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 ...
随机推荐
- JVM内存—堆(heap)栈(stack)方法区(method) (转)
JAVA的JVM的内存可分为3个区:堆(heap).栈(stack)和方法区(method) 堆区:1.存储的全部是对象,每个对象都包含一个与之对应的class的信息.(class的目的是得到操作指令 ...
- Android如何定制一个下拉刷新,上滑加载更多的容器
前言 下拉刷新和上滑加载更多,是一种比较常用的列表数据交互方式. android提供了原生的下拉刷新容器 SwipeRefreshLayout,可惜样式不能定制. 于是打算自己实现一个专用的.但是下拉 ...
- SparkStreaming程序设计
一个简单的 Streamin wordCount object StreamingWordCount { def main(args: Array[String]): Unit = { val spa ...
- JavaWeb项目中各种路径的获取
以工程名为/DemoWeb为例: 访问的jsp为: http://localhost:8080/DemoWeb/test/index.jsp 1 JSP中获得当前应用的相对路径和绝对路径 (1)得到工 ...
- Ubuntu16.04桌面版 连接到ftp服务器
Ftp服务器在不同的网段,需要临时添加网段 不同网段临时添加方法: root@xzrs:/home/rxf# ip addr add 10.1.2.127/24 dev enp0s25 电脑左侧“连接 ...
- Axure的总结
1.Axure的用途 Axure RP 能帮助网站需求设计者,快捷而简便的创建基于网站构架图的带注释页面示意图.操作流程图.以及交互设计,并可自动生成用于演示的网页文件和规格文件,以提供演示 ...
- ThinkPHP5执行流程分析
1.入口文件(tp5\public\index.php) 作用: 1)定义目录常量. 2)加载框架引导目录. 2.框架引导目录(tp5\thinkphp\start.php) 作用: 1)引导基础文件 ...
- 20145327 《Java程序设计》第一周学习总结
20145327 <Java程序设计>第一周学习总结 教材学习内容总结 Java根据领域不同,区分为Java SE.Java EE与Java ME三大平台.Java SE是各应用平台的基础 ...
- delegate委托
https://www.cnblogs.com/leicao/p/5251090.html 委托是一种存储函数引用的类型,在事件和事件的处理时有重要的用途 通俗的说,委托是一个可以引用方法的类型,当创 ...
- redis命令的使用
批量删除特定前缀的keys redis-cli KEYS "prefix:*" | xargs redis-cli DEL 返回list的长度 > LPUSH test &q ...