1

I use MySQL within my application and I just tried to connect to my local MySQL server. First I tried to connect using the right connection details (localhost, user: root, no password). It succeeds. Then I tried to connect using the wrong connection details (localhost, user: root1, password: 123). It failed. But if i leave the password blank then it succeeds? I dont know why but everytime i leave the password blank and only provide a username (whatever username you can imagine) it succeeds! Can anyone help me with this crazy error? Dont know why the server doesn't reject my connection attempt.

Thanks in advance!

4

1 回答 1

3

我建议您将 root 密码更改为以前没有的密码。然后,刷新特权。问题解决了。您将无法使用空白密码在本地登录(通过 PhpMyAdmin 相同)。

有关更多详细信息,您可以访问此链接:http ://dev.mysql.com/doc/refman/5.0/en/default-privileges.html

于 2012-08-07T10:11:07.157 回答