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 ...
随机推荐
- java 2D图形绘制
package jisuan; import java.awt.Dimension; import java.awt.EventQueue; import java.awt.Graphics; imp ...
- 关于netcore 发布到服务器的准备
1.先cmd到指定的网站目录, 然后执行 dotnet xxx.dll, 浏览器查看 localhost:5000 确认没有问题之后才去部署到iis
- jdbc中Class.forName(driverName)的作用
上次面试别人问我jdbc的过程: 我是这样回答的: Class.forName加载驱动 DriverManager.connect(url,username, password)获取连接对象 conn ...
- SQL--数据表--基本操作
表操作 表与字段是密不可分的. 新增数据表 Create table [if not exists] 表名(字段名字 数据类型,字段名字 数据类型 --最后一行不需要逗号) [表选项] ; if no ...
- L302 如何避免秃头
Every guy wants to know how to prevent hair loss. Or, every guy wants to cling to the idea that it m ...
- nodejs .http模块, cheerio模块 实现 小爬虫.
代码: var http = require("http"); var cheerio = require("cheerio"); var url = 'htt ...
- 《统计学习方法》笔记(3):k近邻
k近邻(KNN)是相对基本的机器学习方法,特点是不需要建立模型,而是直接根据训练样本的数据对测试样本进行分类. 1.k近邻的算法? 算法对测试样本进行分类的一般过程如下: 1)根据给定的k值,搜索与测 ...
- 【Python】socket编程-1
一.什么是socket编程:网络上的两个程序通过一个双向的通信连接实现数据的交换,这个连接的一端称为一个socket,编程传输层,socket本质是编程接口(API) 二.网络七层协议:物里层 数据链 ...
- socket 映射服务器程序
server #include <stdio.h> #include <sys/types.h> /* See NOTES */ #include <sys/socket ...
- ubuntu下利用docker搭建gitloab手记
0.环境信息 ubuntu server 14.04 lts 64位版本 Docker version 17.05.0-ce, build 89658be 1.从阿里加速站下载gitlab sudo ...