Home  >  Article  >  Database  >  解决Accessdeniedforuser''@&#39

解决Accessdeniedforuser''@&#39

WBOY
WBOYOriginal
2016-06-07 15:58:491151browse

在修改mysql的root用户密码后,再登陆,提示如标题的错误,找了一番答案之后,终于解决,步骤如下: 1.停掉mysql: service mysqld stop 2.使用不验证的状态登陆mysql: mysqld_safe --skip-grant-tables //后台运行 启动mysql: service mysqld start 3.进入my

在修改mysql的root用户密码后,再登陆,提示如标题的错误,找了一番答案之后,终于解决,步骤如下:

1.停掉mysql: service mysqld stop

2.使用不验证的状态登陆mysql:

mysqld_safe --skip-grant-tables & //后台运行

启动mysql: service mysqld start

3.进入mysql: mysql -u root

4.use mysql;

5.delete from user where user=''; 删除空用户

6.flush previlige; 刷新权限

7.service mysqld restart

8.问题解决

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn