LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-11-2011, 03:07 PM   #1
Kjanss
LQ Newbie
 
Registered: Oct 2011
Posts: 6

Rep: Reputation: Disabled
Remote access to Mysql


Hi

I have 2 centos5/32 VPS boxes at my provider. If it matters, they're both on OpenVZ.

BOX-A is a bare mysql server (no special other services installed)
BOX-B is a full lamp

I want to access the BOX-A mysql from BOX-B

Easy you might say, but I've tried so many things, it still won't connect. I assume my mysql on BOX-A is configured right.

I get stuck much earlier. Even a telnet from BOX-B to port 3306 on BOX-A gets a time out.

I've tried a lot of stuff in iptables, at the end I opened everything for everybody and I even removed the whole iptables service all way. It still doesn't work.

BOX-A is a test server so I cannot do anything too bad.
I reinstall it regularly.

Any suggestions?
 
Old 10-11-2011, 04:42 PM   #2
AuroraZero
Member
 
Registered: Oct 2009
Location: memphis, TN
Distribution: SlackWare 14.2, Android, Slax, Centos 5.9 Final, Centos 6
Posts: 188

Rep: Reputation: 32
Make sure you have not made a typo in the ip address. Make sure Box B can be reached from a manual telnet on that port. Maybe your provider has the port blocked for some reason.
 
Old 10-11-2011, 04:50 PM   #3
Kjanss
LQ Newbie
 
Registered: Oct 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi AuroraZero,

Thanks for your tips.
A wrong IP is however out of the question - I was very careful with that.


Both boxes come completely unmanaged and without any port restrictions or whatsoever.
For example I can ssh from BOX-B to BOX-A without problems
A normal telnet to that machine on 3306 gives a time out however.
I cannot get it out of my head that it has something to do with the openvz. ifconfig says i have a 'venet0' instead of a 'eth0' which I would expect.
 
Old 10-11-2011, 05:29 PM   #4
AuroraZero
Member
 
Registered: Oct 2009
Location: memphis, TN
Distribution: SlackWare 14.2, Android, Slax, Centos 5.9 Final, Centos 6
Posts: 188

Rep: Reputation: 32
Your provider controls that aspect and you are probably correct. The hardware firewall they have may also be the problem. Venet0 is basically a virtualized connection not a hardware one. The config of openvs most likely is the culprit and would have to be changed by the provider. Unless you try a different telnet port.
 
Old 10-12-2011, 05:15 AM   #5
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Use nmap to see if the server ports is open from the client perspective. I believe MySQL runs on port 3306. If the port is open and you are still having failure to connect issues, make sure that the server is configured to accept remote connections and the user name string will need to account for the remote host name too, either as user@host or by using a wild card.
 
Old 10-12-2011, 06:40 AM   #6
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
Is mysqld running, listening, and configured to listen on the right address? ie: my.cnf: bind-address= & skip-networking ?
Code:
BOXA ~ # netstat -tnlp
Can you connect to MySQL on the MySQL server locally? ie:
Code:
BOXA ~ # mysql -u someone -p
You say that "I assume my mysql on BOX-A is configured right.", why? in my experience, whenever i assume i have something configured right, and it doesnt work, it usually aint.
 
Old 10-12-2011, 11:39 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Moved: This thread is more suitable in the Networking and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
access remote mysql db with mysql-administrator command uppalagayatri Linux - Newbie 4 05-13-2011 02:22 AM
[SOLVED] mysql remote access unkie888 Linux - Software 1 02-12-2011 12:55 AM
can access to mysql from remote,help!!! ajaxer Debian 2 06-30-2008 03:52 AM
Mysql remote access dereko Linux - Server 10 04-22-2008 07:46 PM
Remote MySQL access gauge73 Linux - Software 2 03-05-2006 08:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration