Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to be able to connect to a mysql database remotely but don't know what ipaddress I would be connecting from. Either I'll be connecting over a vpn with dynamically assigned ip addresses or I'll be connecting from inside the company network.

share|improve this question
up vote 1 down vote accepted


You can specify wildcards in the host name. For example, user_name@'' applies to user_name for any host in the domain, and user_name@'192.168.1.%' applies to user_name for any host in the 192.168.1 class C subnet.

So to allow access from any IP address use user_name@'%.%.%.%'

If you haven't enabled networking to mysql you'll need to do that first:

Of note (if looking at the previous link) after at least mysql server version 5.1.54 for compatibility there is no # skip-networking line only a bind-address = line. Simply change this loop back address to the servers actual ip address and networking is enabled.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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