mysql启动提示 access denied for user root@localhost(using pa
本文章来介绍关于mysql启动提示 access denied for user root@localhost(using password:YES) 解决办法总结,有需要的朋友可参考本文章。
关键是看:Access denied for user 'root'@'localhost' (using password: YES)'
从错误中可以看出你的权限是对localhost的访问没有放开。
于是你可以使用如下命令来放开权限:
解决办法
1. 管理员登陆系统,停止mysql服务或者结束mysqld-nt进程;
2. 进入命令行,来到mysql的安装目录.假设安装目录为 d:mysql , CMD进入命令行;
3. 运行 D:Program FilesMySQLMySQL Server 5.5binmysqld-nt --skip-grant-tables启动mysql,关闭权限的检查;
4. 运行 D:Program FilesMySQLMySQL Server 5.5binmysqladmin -u root flush-privileges password "newpassword" 重设root密码;
5. 重新启动mysql服务;
命令方式解决
方法一:
代码如下 | 复制代码 |
# /data/mysql/bin/mysqladmin -u -p # /etc/init.d/mysql restart mysql> |
解决方法二
首先计入到mysql的客户端命令行。
然后
代码如下 | 复制代码 |
grant all privileges on *.* to 'root'@'localhost' identified by '你的密码' with grant option; flush privileges; |
执行完这两条命令之后就可以了
推荐阅读
-
MYSQL ERROR 1045 (28000): Access denied for user (using password: YES)问题的解决
-
ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)
-
MYSQL ERROR 1045 (28000): Access denied for user (using password: YES)问题的解决
-
ERROR 1045: Access denied for user: root@localhost (Using password: NO)
-
win10下MySQL 8.0登录Access denied for user‘root’@‘localhost’ (using password: YES)问题的解决方法
-
Linux连接mysql报错:Access denied for user ‘root’@‘localhost’(using password: YES)的解决
-
MySQL密码正确却无法本地登录-1045 Access denied for user 'root'@'localhost' (using password:YES
-
Linux连接mysql报错:Access denied for user ‘root’@‘localhost’(using password: YES)的解决
-
Linux连接mysql报错:Access denied for user ‘root’@‘localhost’(using password: YES)的解决方法
-
提示:ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'的错误如何解决?