Remote MySQL connect

marc gmane at auxbuss.com
Wed Dec 13 11:00:39 UTC 2006


Jens Cedlind said...
> 
> 
> marc wrote:
> > What is the 'correct' way to configure MySQL for remote connections?
> > 
> > The db in question is running fine and can be accessed via phpmyadmin, 
> > amongst other things.
> > 
> > The default my.cnf has:
> > 
> >   bind-address - 127.0.0.1
> > 
> > When I comment this out (and restart the db), I can connect remotely - 
> > so user/password and privs are fine) but this leaves the db wide open.
> > 
> > Say I want to provide remote access to 192.168.0.1. Can this be done via 
> > MySQL's config or must it be done via the firewall and removing bind-
> > address?
> > 
> 
> My preferred way would be to create a user that can only connect from 
> 192.168.0.1 in MySQL. This can be done easily from phpmyadmin.

Yup, but that still means opening up the port over the net, because 
bind-address must be removed. 

I ended up tunneling in over SSH.

-- 
Best,
Marc





More information about the ubuntu-users mailing list