Home > Database > Mysql Tutorial > body text

解决Accessdeniedforuser''@&#39

WBOY
Release: 2016-06-07 15:58:49
Original
1152 people have browsed it

在修改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.问题解决

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template