views:

77

answers:

1

Hi, I am developing an app with MySQL. I have MySQL (XAMPP) running on my PC. All works fine but now I want to let other users from our network to login, but I found out that when I change user property "localhost" to % (any computer) I get access denied even with my own account. So, in the short, everytime I change "localhost" to "%" (any computer) I get "access denied". When switch back to localhost I can log easily.

What is wrong please? Thank you

+3  A: 

In MySQL, user@localhost and user@% are two completely different and unrelated users. You need to grant access to your data (and, if applicable, set a password) for user@% in addition to granting access for user@localhost. One does not also provide the other.

Dave Sherohman
So If I understand correctly, I will need to have 2 versions of each user in the case I would need to login from localhost or remote? Also for standard users who never connect from lh I can set only %.
Petr
Correct on both counts.
Dave Sherohman