Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getting remote access to MySQL on gentoo (for a new be)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
brent_weaver
Guru
Guru


Joined: 01 Jul 2004
Posts: 502
Location: Burlington, VT

PostPosted: Mon Dec 24, 2012 5:46 pm    Post subject: Getting remote access to MySQL on gentoo (for a new be) Reply with quote

Good morning. I am trying to figure out how to connect remotely to a MySQL server. I am just playing and learning but I cannot find any clear documentation about how to get remote access. I will be connecting to G2 MySQL server from Mac OSX using Sequel Pro.

Any help is much appreciated!
_________________
Brent Weaver
Back to top
View user's profile Send private message
lxg
Veteran
Veteran


Joined: 12 Nov 2005
Posts: 1019
Location: Aachen, Germany

PostPosted: Wed Dec 26, 2012 1:07 am    Post subject: Reply with quote

On the server, set the value of bind-address to your network interface's IP address, and make sure that skip-networking is not active. Restart the mysql server.

On the client side, connect with the following command: mysql -h hostname -u username -p

The user must have the permission to connect from your hostname, so if you GRANTed the user permissions as user@localhost, you must once again GRANT them as user@your.client.host.name, or without a hostname at all (potentiall dangerous).

Be aware that having a MySQL server listening to a public network interface may be a security threat. If you know that you only connect from certain clients, make sure to set up IPtables rules which allows access to port 3306 (MySQL's standard port) only from the clients in question.

I personally don't let MySQL listen on public NICs, I always SSH to the machine first, and then open MySQL locally. A VPN may also be an adequate solution, if you want to use remote management software for MySQL.
_________________
lxg.de – codebits and tech talk
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum