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 ...
随机推荐
- 【转】C语言中字符串输入的三种方法
在网上看到,讲的还算详细,转过来学习一下...... ======================================================================= 使 ...
- vue-7-表单
示例: <input v-model="message" placeholder="edit me"> <p>Message is: { ...
- 5.4 C++重载输入与输出操作符
参考:http://www.weixueyuan.net/view/6382.html 总结: 在C++中,系统已经对左移操作符“<<”和右移操作符“>>”分别进行了重载,使其 ...
- easyui 日期控件限制起始相差30天
$('#lendDateStart').datebox('calendar').calendar({ validator: function(date){ var endDateStr = $('#l ...
- 一次练习 发现的问题,malloc free 无效;findfirstfile失败,writefile失败的原因
#include <windows.h> #include <stdio.h> #include <shlwapi.h> #pragma comment(lib,& ...
- 强化学习3-蒙特卡罗MC
之前讲到强化学习可以用马尔科夫决策过程来描述,通常情况下,马尔科夫需要知道 {S A P R γ},γ是衰减因子,那为什么还需要蒙特卡罗呢? 首先什么是蒙特卡罗? 蒙特卡罗实际上是一座赌城的名字,蒙 ...
- POJ 2407 Relatives(欧拉函数入门题)
Relatives Given n, a positive integer, how many positive integers less than n are relatively prime t ...
- python基础题型一
一.执行Python脚本的两种方式 #python name.py Python解析器 #chmod +x name.py 二.简述位.字节的关系 1Byte=8bit 三.简述ascii.uni ...
- php session_start()
session_start()后 对应的session文件是被锁定的,直到当前脚本结束才会解锁.在锁定期间,令一个进程访问相同session id 要等文件解锁后session_start()才会开始 ...
- 莫烦tensorflow(2)-Session
import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import tensorflow as tfmatrix1 = tf.constant([[3,3] ...