PDA

View Full Version : TIP: Connecting to mySQL over a network



sange
11-06-2004, 05:56 PM
I racked my brains for the better part of a day trying to figure this one out...and the worst part is it's not documented anywhere that the networking option is off by default (except in the config file where it's turned off).

You should be in a terminal as root.
To enable networking (i.e. listen on port 3306) open up /etc/msql/my.cnf in an editor.

Scroll down to the line that says "skip-networking" (it was line 47 in mine), and comment it by putting a # in front. Save and exit.

stop the server:
/etc/init.d/mysql stop

start it up again:
mysqld &

That's it! Now you can connect from another machine with mysqlcc or whatever else. :D