Red Hat This forum is for the discussion of Red Hat Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-02-2003, 08:03 AM
|
#1
|
Member
Registered: Oct 2003
Posts: 64
Rep:
|
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
|
|
|
10-02-2003, 09:34 AM
|
#2
|
Member
Registered: Sep 2003
Location: Somerville, MA
Distribution: Fedora/RHEL currently. Red Hat, Slackware, Debian, SuSe and Mandrake at other times
Posts: 104
Rep:
|
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.
|
|
|
10-02-2003, 09:50 AM
|
#3
|
Member
Registered: Oct 2003
Posts: 64
Original Poster
Rep:
|
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
|
|
|
10-02-2003, 10:56 AM
|
#4
|
Member
Registered: Sep 2003
Location: Somerville, MA
Distribution: Fedora/RHEL currently. Red Hat, Slackware, Debian, SuSe and Mandrake at other times
Posts: 104
Rep:
|
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!
|
|
|
10-02-2003, 11:56 AM
|
#5
|
Member
Registered: Oct 2003
Posts: 64
Original Poster
Rep:
|
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!!!
|
|
|
All times are GMT -5. The time now is 03:46 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|