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)

解决方案:
1、找到配置文件my.ini ,然后将其打开,可以选择用NotePadd++打开

2、打开后,搜索mysqld关键字
找到后,在mysqld下面添加skip-grant-tables(随便哪行都可以),保存退出。

这样,是用于跳过密码问题,但是呢,这并不能彻底解决!
3、重启mysql服务
我的电脑----》右键------》管理--------》服务与应用-----------》服务-----------》找到MySql服务右键停止,然后在右键重启就好。
3.2或者使用cmd命令重启服务并重写密码
步骤如下:
(1)在任何路径目录下,都可以关闭/重启mysql的服务呢。(因为,之前,已经配置全局的环境变量了)
net stop mysql(停止命令)
net start mysql(开启命令)
(2)进入数据库,重设置密码。
mysql -u root -p Enter
不用管password Enter

mysql> use mysql; Enter
mysql> update mysql.user set authtntication_string=password('rootroot') where user='root'; (密码自己设)

mysql> flush privileges; 刷新数据库
mysql> quit;

5、密码重设置成功,改好之后,再修改一下my.ini这个文件,把我们刚才加入的"skip-grant-tables"这行删除,保存退出再重启mysql服务就可以了。

6、重启mysql服务,并登录mysql用户,用户是root,密码是root。

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登录时出现Access denied for user 'root'@'localhost' (using password: YES) 拒绝访问 对于出现拒绝访问root用户的解决方案错 ...
- CentOS命令登录MySQL时,报错ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)错误解决方法
1.停用mysql服务:# /etc/rc.d/init.d/mysqld stop 2.输入命令:# mysqld_safe --user=mysql --skip-grant-tables --s ...
- CentOS 7.6下解决登录MySQL时,ERROR 1045 (28000): Access denied for user root@localhost (using password: YES
https://blog.csdn.net/sinat_35406909/article/details/79763782
- 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 ...
- Ubuntu下MySQL报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
在Ubuntu下 想要登录mysql数据库 root@JD:~# mysql -uroot -p 报错 ERROR 1045 (28000): Access denied for user 'root ...
- 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 ...
- 重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
出现报错: Warning: World-writable config file '/etc/my.cnf' is ignored // 该文件权限过高ERROR 1045 (28000): Acc ...
- 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) Linux: MyS ...
- 解决mysql登录报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)问题
问题描述: 在ubuntu14.04上安装完MYSQL后,MYSQL默认给分配了一个默认密码,但当自己在终端上使用默认密码登录的时候,总会提示一个授权失败的错误. 报错信息:Access denied ...
随机推荐
- hybrid几种模式
native和web适合的场景 Native: 用户体验要求高 业务变动很小(如首页) 性能要求高 Web: 业务变化频繁(如广告) 性能要求低 展示性内容 hybrid App其实会有不同的分支 方 ...
- 页面显示时间js
//页面显示时间 <span align="left" id="OperatorTime"> </span> <script> ...
- weblogic连接池过小导致TPS呈周期性跳坑现象
利用晚上时间跑个12小时稳定性,第二天发现TPS曲线图成了这个样子. 排查步骤: 1.观察TPS图发现,几乎每两个小时TPS掉一次坑,是周期性的,而且TPS有掉到0的现象.LR上也有失败的交易,猜想是 ...
- jvm的基本结构以及各部分详解(转)
原文链接:https://www.cnblogs.com/zwbg/p/6194470.html 1.java虚拟机的基本结构 图: 1.类加载器子系统从文件系统或者网络中加载Class信息,类信息( ...
- <Java><Multi-thread><Lock interface>
Overview 介绍java的lock interface. Motivation java拥有像synchronized这样的内置锁,那为什么还需要lock这样的外置锁呢? 首先,性能不是选择sy ...
- python-函数参数不固定
默认参数的应用场景: 1.默认安装 2.数据库连接,默认端口号 参数不固定的情况: 参数组: args:将接收的位置参数转换成元组 def test(*args): print(args) ...
- 3d的 一些公式
1. 3d围绕 z轴旋转 x,y 变换公式: // α β x = r cosα y = r sinα x' = r cos (α+β) y' = r sin (α+β) x' = r (cosα c ...
- 2--Jmeter 4.0--Excel 数据驱动 接口测试
Excel 模板 通过jmeter的csv data set config 读取 Jmeter注意事项 (1)数据驱动 1..JDBC :SQL 存储在excel中,无法将where条件对应的jmet ...
- elfutils cc1: all warnings being treated as errors
/********************************************************************** * elfutils cc1: all warnings ...
- Twisted 安装
1,官网: https://www.twistedmatrix.com/trac/ 2,下载 https://twistedmatrix.com/Releases/Twisted/18.7/Twist ...