Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The bind-address is currently set to the server's ip that mysql is running on. Can I put a comma or something after it and add my ip address or could that effect something on the server?

update

Yes, I'd like to be able to access MySQL from my local machine here in the office. I am on a static IP on the local network.

share|improve this question
    
To accomplish what goal? –  Warner Jul 15 '10 at 20:54
    
I think he wants MySQL to be accessible remotely (outside localhost) and be accessible only from one specific IP address. –  Weboide Jul 15 '10 at 21:45

2 Answers 2

up vote 2 down vote accepted

The bind address is the IP address you want MySQL to listen on.

It has to be an IP address on the server.

So if ifconfig shows you have IP addresses

192.168.1.14
62.134.23.7
127.0.0.1

You can make MySQL listen to requests from the big wide world by binding it to 62.134.23.7,

If you want to only listen to requests on your LAN, set the bind-address to 192.168.1.14 and

If you want MySQL to only listen to clients on the same server set the bind-address to 127.0.0.1

If you need to listen on more than one interface (say LAN, localhost and internet) then comment out the line so MySQL listens on all interfaces.

If you do allow connections from the internet, then use IP tables (or ufw) to only allow connections to port 3306 from the IP of your remote client PC at the office.

share|improve this answer

in a debian lenny mysql server I commented the bind-address line with a '#' and reloaded the mysql server. If you need to limit access to the mysql server from just a limited ip range, you will have to set up some firewall rules.

share|improve this answer
    
How come my own server's IP is on the list.... is that necessary, is it doing anything? Can I replace it with my own IP? –  Webnet Jul 26 '10 at 15:02

Your Answer

 
discard

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.