LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 10-02-2003, 08:03 AM   #1
bper
Member
 
Registered: Oct 2003
Posts: 64

Rep: Reputation: 15
Can't connect to MySQL server remotely on RedHat 9


Hi, trying to be as descriptive as I can,
I have a MySQL 4.0.13 server running on RedHat 9.0.
I can connect locally using a user and password for which I issued a MySQL grant on any host.
I have 3 different scenarios producing virtually the same result:
1) I have a RedHat 9.0 system running outside the linksys router on which the MySQL server is running (external network connecting to the MySQL server).
2) A RedHat 9.0 system running inside the router on which the MySQL server is running and
3) An XP system running inside the router.

All 3 machines can ping the MySQL server machine and vice-versa. When trying to connect to the DB server with the MySQL client (mysql -h DB -u user -p databasename) I get the following errors from from the RedHat clients:

Error 2003: Can't connect to the MySQL server running on DB (111)

and from the XP client:
Error 2003: Can't connect to the MySQL server running on DB (10054)

I have no error msgs any other place (no log files). I have no my.cnf file on the database server machine.

What could my problems be? MySQL configuration? Linux configuration? Router configuration?

Sorry if this is too much info, but any help would greatly be appreciated.

Thanks
 
Old 10-02-2003, 09:34 AM   #2
usernamenumber
Member
 
Registered: Sep 2003
Location: Somerville, MA
Distribution: Fedora/RHEL currently. Red Hat, Slackware, Debian, SuSe and Mandrake at other times
Posts: 104

Rep: Reputation: 15
run 'service iptables status' as root. There could be an errant firewall rule blocking access. mysqld likes to be able to listen on tcp/udp ports 3306.
 
Old 10-02-2003, 09:50 AM   #3
bper
Member
 
Registered: Oct 2003
Posts: 64

Original Poster
Rep: Reputation: 15
Thanks a lot for responding!

OK, the iptables command shows nothing specific to port 3306, but it shows rejects for tcp/udp from anywhere to anywhere in the RH-Lokkit-0-50-input Chain
 
Old 10-02-2003, 10:56 AM   #4
usernamenumber
Member
 
Registered: Sep 2003
Location: Somerville, MA
Distribution: Fedora/RHEL currently. Red Hat, Slackware, Debian, SuSe and Mandrake at other times
Posts: 104

Rep: Reputation: 15
Try this:

Do 'service iptables stop'
Then try to connect to mysql again.

If that works, then iptables is your problem. Now, do 'service iptables start' immediately so you don't spend more time than you need to with your firewall down. =:) Once that's done, run redhat-config-securitylevel and make sure to let 3306 through for both tcp and udp. But be warned that this will allow -anyone- to try and access your mysql daemon. If you want to restric access to, say, only your interenal network you willhave to do something like:

iptables -I INPUT -s 192.168.0.0/24 -p tcp --dport 3306 -j ACCEPT
service iptables save

Enjoy!
 
Old 10-02-2003, 11:56 AM   #5
bper
Member
 
Registered: Oct 2003
Posts: 64

Original Poster
Rep: Reputation: 15
Thanks again for responding!

While I was waiting for your last reply, I changed the redhat security settings (gnome) to allow eth0 as a trusted device and that allowed me to connect to the server.

I will look into your suggestions to apply the appropriate rules for the network.

BTW, I posted this question to another users group and though many people viewed it, no one replied. You're the only one that replied. Whatever the reason for that, I REALLY appreciate your help.

Thanks a lot!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 03:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 08:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM
vsftpd server: can connect locally, not remotely propz Linux - Networking 2 10-24-2005 01:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 03:46 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