Ask the Expert

Giving users access via wildcard

I am using MySQL Administrator to control MySQL. When I create users with MySQL Administrator, I can't access MySQL from any other applications. I can access only through "root" and without password. Why is this happening? How can I fix it?

    Requires Free Membership to View

Try granting that user some privileges.

If that doesn't solve the problem, check the user's host. Using Query Browser or the command line client, while connected as root, issue the following command:

SELECT user, host FROM mysql.user WHERE user = 'theUserYouCreated';

Check the `host` field. If it is set to the wildcard "%," your user should be able to connect from anywhere. If it is set to "localhost," your user can only connect from the server on which MySQL is running. Use the GRANT statement to give user access from "%."

This was first published in September 2006

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: