错误显示: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. SpringMVC:后台将List转为Json,传值到页面

    一.JSP页面 <body> <form name="test" action="getAllStudent" method="po ...

  2. SWAP 简介

    swap 交换分区,是存放在内存当中的临时数据(断电数据丢失) SWAP作用:当内存不足时会导致系统挂了,SWAP就是起到一个临时内存的作用,当内存不足时SWAP充当临时内存,防止系统挂掉

  3. python字符串转换成数字

    Action(){ int i; char *s="{str}"; i=atoi(lr_eval_string(s)); lr_output_message("%d&qu ...

  4. windows文件映射

    0x01 使用文件映射实现共享内存. 用内存映射文件实现进程间的通讯:Windows中的内存映射文件的机制为我们高效地操作文件提供了一种途径,它允许我们在进程中保留一段内存区域,把硬盘或页文件上的目标 ...

  5. L1-056 猜数字

    一群人坐在一起,每人猜一个 100 以内的数,谁的数字最接近大家平均数的一半就赢.本题就要求你找出其中的赢家. 输入格式: 输入在第一行给出一个正整数N(≤10​4​​).随后 N 行,每行给出一个玩 ...

  6. java基础学习之final关键字

    final可以修饰类.方法.变量,一旦使用了final则将不能改变被修饰的对象的引用; 被final修饰的类不可以被继承 被final修饰的方法不可以被覆盖 被final修饰的变量一般为常量,只允许对 ...

  7. adb devices连接不上设备

    1.端口被占用 解决办法:netstat -aon|findstr "5037",找到占用5037这个端口的进程,然后根据pid在任务管理器里面找到进程然后结束 2.插拔usb数据 ...

  8. python day05作业

  9. laravel 部署 前后端分离

    1. iis服务器配置(web.config): <configuration> <system.webServer> <rewrite> <rules> ...

  10. Enhancement in SAP abap.

    Recently I have been taught through how to do enhancement for those standard programs. Th reason for ...