I need to enable remote access for a specific user on a mysql server, running debian oldstable.

Bear in mind I'm no SQL expert nor a real sysadmin.

Logging in phpmyadmin and looking at the Privileges page, I notice two odd things:

  1. an "Any" user, with host %, no password, and global USAGE privilege. No idea what does that mean or imply. If I "edit" that user, I see it has a lot of privileges on a table called test and on a test\_%, whatever that means - please notice I have no such tables in my database, at least they do not appear in the phpmyadmin list.
  2. root both have a line for "localhost" host, and for "" host.

Point 2 is fine, just odd, seems a bit redundant and senseless to me. Point 1 is what worries me, what am I supposed to do about that?


In response to your questions.

The "Any" user and the "test" database are used by mysql during installation to check that the database was installed properly. You can safely remove both after the installation.

I am unsure about the redundancy in the root user "localhost" and "". Mysql probably just does that to be safe.

To allow remote access, you will need to edit the file /etc/mysql/my.cnf to make mysql bind to external interfaces. By default, mysql will only accept connections from localhost for security reasons. Follow the instructions given here.

After that, create a new user and give it the user's ip or '%' for all ips and restart mysql. The remote user should now be able to connect to the mysql instance.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.