Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Aug 21, 2008 6:18 pm 
Offline
Newbie

Joined: Mon Apr 28, 2008 12:31 pm
Posts: 3
Hi,

I have a linode with 2 ips and a mysql server running but no matter what I try, I can't connect it from the outside, not even telnet it.

$ mysql -h 70.85.31.xxx -u test
ERROR 2003 (HY000): Can't connect to MySQL server on '70.85.31.xxx' (110)

$ telnet 70.85.31.xxx 3306
Trying 70.85.31.xxx...
telnet: connect to address 70.85.31.xxx: Connection timed out
telnet: Unable to connect to remote host: Connection timed out

$ telnet 67.18.186.xxx 3306
Trying 67.18.186.xxx...
telnet: connect to address 67.18.186.xxx: Connection timed out
telnet: Unable to connect to remote host: Connection timed out

My mysql server is working fine with connections from inside. I don't have 'skip-networking' in my my.cnf.

I'm using firehol for firewalling and is set to allow connections to port 3306. But even stopping firehol, it won't allow connections. Httpd, ftpd, sshd, etc.. are working just fine.

Anyone knows what the problem is?

Thanks.


Top
   
 Post subject:
PostPosted: Thu Aug 21, 2008 7:04 pm 
Offline

Joined: Thu Aug 21, 2008 7:02 pm
Posts: 1
Check the /etc/mysql/my.cnf file for the line starting with bind-address.

It's set to 127.0.0.1 by default, you need to change that to your public IP in order to connection from the outside world.

(May vary a bit depending on your version of mysql, distro, etc)


Top
   
 Post subject:
PostPosted: Fri Aug 22, 2008 11:39 pm 
Offline
Newbie

Joined: Mon Apr 28, 2008 12:31 pm
Posts: 3
That did the trick :D

Thanks Boone!


Top
   
 Post subject:
PostPosted: Sat Aug 23, 2008 1:33 am 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
I find it's easier (and gives me better peace-of-mind) to tunnel MySQL connections over SSH. That way, I don't have to open a new port (especially one so juicy a target), and I don't have to worry about configuring MySQL for either SSL or non-local networking. YMMV.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group