The database server is running Ubuntu Server Edition using MySQL as the database engine. The development machine is running Windows XP Pro and I utilize MySQL Connector/ODBC 3.51 to connect. I get following error message when trying to connect:
[MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'server_name' [10061]I then try to connect using command line:
mysql -h server_name -u root -pand get following error:
ERROR 2003 (HY00): Can't connect to MySQL server on 'server_name' (1111)This must be some kind of stupid configuration error that I do not know about. I spend some time googling around and manage to find the solution:
- Edit the configuration file located at /etc/mysql/my.cnf
- Find the line bind-address = 127.0.0.1. The default value 127.0.0.1 means that it will only accept connection from local machine. I change the value to 0.0.0.0 and save it
- Restart MySQL by issuing /etc/init.d/mysql restart
8 comments:
thanks!
Thx, saved me a lot of trouble
Great, Great TIP
THANKS !!!!
You are welcome. Glad it helps!
You saved a lot of my time.
You got a big bundle of thanks!
WOOW nice 1 brother you saved my day :-))))
Thank you very much
Excellent! Thanks for this handy nugget of help!
This fixed my issue, thanks!
Post a Comment