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.

I am using MySQL server on Ubuntu 10.04 and after changing the bind-address from 127.0.0.1 to my webserver IP in /etc/mysql/my.cnf the mysql server fails to load. Any clues will be highly appreciated!

I have tried disabling iptables but useless

Thanks,

share|improve this question

migrated from stackoverflow.com Jun 16 '10 at 5:08

This question came from our site for professional and enthusiast programmers.

    
Have you tried to take a look at the mysql server log? –  Itay Moav -Malimovka Jun 16 '10 at 4:06
    
Post your my.cnf plz –  user47581 Jun 16 '10 at 5:08
add comment

2 Answers

bind-address is the address which MySQL server listens, it should be 127.0.0.1 for local connection and machine IP for remote connection. Why you change the bind-address to web server IP? Is the web server in the same machine of MySQL server?

share|improve this answer
add comment

We too had the same problem exactly on Lucid Lynx, while not having it on earlier Ubuntu releases. You know you're hitting the same issue if:

  1. mysql error log says it can't bind to that address or the address doesn't exist or something like that (can't remember the exact wording)
  2. mysql works perfectly if you start/restart it after booting the system

Seems like Ubuntu 10.04 tries to start MySQL before having assigned ip addresses to all network interfaces, so you don't actually have your ip setup when it starts.

We workarounded it by binding mysql to the 'any' address (0.0.0.0) and opening an hole for its port in our iptables (which is default closed for any traffic on any port on any ip).

share|improve this answer
add comment

Your Answer

 
discard

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