PDA

View Full Version : Remote MySQL and Debian


ferret
2004-02-17, 11:11 AM
Before anyone starts with a 'omg don't open Mysql to remote connections!!" .. Just assume I have a vaild reason and will be taking as many precautions as possible to make sure that 'just anyone' can't log in.

On to the question then.. Er.. How? Debian installs MySQL with a default 'skip-networking' option, and other than that doesn't tell you how to re-enable networking and allow connections. Commenting out the 'skip-networking' line from my.cnf doesn't correct, so I'm down to wondering:

A) Does Debian have something else blocking MySQL connections?

B) Am I an idiot and not understand how to setup a user to be allowed from a remote hostname? I'm pretty sure its not this one, but hey..

Any help is appreciated.

QT
2004-02-17, 11:31 AM
The first thing to check would be to see if mysql is actually listening:

netstat -na | grep :3306

ferret
2004-02-17, 12:34 PM
Let me add to the previous post:

C) I'm an idiot and forgot netstat could show me what ports are being listened on. Depending if MySQL is listening or not will suggest whether or not I'm an idiot for option B.

Though I should say, local connection to MySQL are fine.. But I believe these are handled through file sockets, yeah? So that's not gonna be tied to the port anyways..

Edit: I'm at work atm, can't access the box from here. Else I'd tell you if I found the port up or not. Mmmm. Work. Love the firewall.

ferret
2004-02-18, 17:18 PM
Is this the line I need?

tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN

karrot-x
2004-03-03, 17:33 PM
Make sure you have the port entry in the mysql-safe mode, otherwise you'll go nowhere :).