Some problems of mysql

来源:互联网 发布:linux valgrind 编辑:程序博客网 时间:2024/06/05 03:35

This post is about some problems of mysql.

1.access denied for user root@localhost(using password no)

Reason: all kinds of problems.

Solution: modify the password according to the following steps.

step 1) Stop the mysql service.

Open the command prompt window and input the command "net stop mysql". or you can stop the service in the services.msc.

step 2) entry the security mode of mysql.

entry the bin directory of mysql's installation and input the command "mysqld-nt --skip-grant-tables" and don't close this window.

step 3) modify the root's password.

3.1. open the new command prompt window and input the command "mysql -uroot -p" and entry the "enter" without the password.

3.2. input the command "update mysql.user set password=PASSWORD('new password') where User='root';"

3.3. fresh the privileges table

input the command "flush privileges;" and quit mysql.

Step 4) restart the mysql service.

2.access denied for user root@localhost(using password yes)

Reason: the password you input was wrong.

Solution: input the right password or modify the password according to the above step.

 

原创粉丝点击