错误显示: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)错误的更多相关文章

  1. mysql登录报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    在MySQL登录时出现Access denied for user 'root'@'localhost' (using password: YES) 拒绝访问 对于出现拒绝访问root用户的解决方案错 ...

  2. 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 ...

  3. 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

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 重置密码解决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 ...

  8. 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 ...

  9. 解决mysql登录报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)问题

    问题描述: 在ubuntu14.04上安装完MYSQL后,MYSQL默认给分配了一个默认密码,但当自己在终端上使用默认密码登录的时候,总会提示一个授权失败的错误. 报错信息:Access denied ...

随机推荐

  1. flask-security(一)快速入门

    很多例程都是基于flask-sqlalchemy的. 但是我使用sqlalchemy,并没有使用sqlalchemy,看中的也就是flask的灵活性. 暂时写flask的程序,但是为了以后写别的程序方 ...

  2. MATLAB 图像归一化

    matlab图像处理为什么要归一化和如何归一化一.为什么归一化1.   基本上归一化思想是利用图像的不变矩寻找一组参数使其能够消除其他变换函数对图像变换的影响.也就是转换成唯一的标准形式以抵抗仿射变换 ...

  3. (C/C++学习笔记) 七. 类型转换

    七. 类型转换 ● 隐式类型转换 隐式类型转换 implicit type conversions #include<iostream> using namespace std; void ...

  4. LeetCode难度与出现频率

    转载自:LeetCode Question Difficulty Distribution               1 Two Sum 2 5 array sort         set Two ...

  5. Xilinx 7 series FPGA multiboot技术的使用(转)

    reference:https://www.cnblogs.com/chensimin1990/p/9067629.html 当升级程序有错误的时候,系统会启动golden bitstream 注意: ...

  6. Mysql event事件用法

    公司的数据库需要进行定期删除数据,需要用到mysql event事件,学习和梳理这块知识. 1查看event是否开启 SHOW VARIABLES LIKE 'event_scheduler'; 2开 ...

  7. 设置checkBox不拦截焦点

    android:clickable="false"android:focusableInTouchMode="false"android:focusable=& ...

  8. [Paper] LCS: An Efficient Data Eviction Strategy for Spark

    Abstract Classical strategies do not aware of recovery cost, which could cause system performance de ...

  9. L267 How to save money

    When it comes to saving money, the struggle is all too real. It's like your bank account and your 20 ...

  10. shell脚本实例-判断主机存活 以及企业备份方案

    1.上次写了一个脚本我那次考虑不是很周全,这次我将脚本改动了一下,这次是判断三次, 希望关注我的人可以经常交流哈.下面我写上代码. #!/usr/bin/bash while read ip do f ...