MySQL will not allow remote connections, iptables is disabled, CentOS 5.6.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
MySQL will not allow remote connections, iptables is disabled, CentOS 5.6.
When assigning a user from a remote IP to connect to a database it's not connecting at all, no error message, no DENIED, nothing. It is also failing to connect with root so something is wrong. Bind IP is set to the server IP, i have also tried taking it out still no dice, also tried disabling iptables, still no dice. Port 3306 is forwarded, so for now iptables is disabled.
I'm running on Centos 5.6, using phpmyadmin, but I have also tried to assign the user via the commandline and create a new database, still not working.
Been googling and troubleshooting for hours now.
I've also attempted to assign the database and user via commandline, didn't work.
This is a Virtual Machine running off of VirtualBox, but it's being hosted on a server with a /29 block IP allocation. I am using SSH to connect to it, it connects to the internet perfectly fine, as with 'telnet [serverip] 3306'.
I am banging my head on the table trying to figure out what is wrong, I have also disabled the firewall to ensure that that wasn't blocking the port.
You mean you can telnet to port 3306 from a console on the same system? How about from a different host? Have you commented out "skip-networking" in my.cnf?
You mean it has a public IP address (bridged networking in VirtualBox), and no NAT is being performed?
If you try connecting to port 3306 from an external host, does tcpdump -i eth0 -v tcp port 3306 on the VM (assuming the public IP is assigned to eth0) show both incoming packets and replies?
You mean it has a public IP address (bridged networking in VirtualBox), and no NAT is being performed?
If you try connecting to port 3306 from an external host, does tcpdump -i eth0 -v tcp port 3306 on the VM (assuming the public IP is assigned to eth0) show both incoming packets and replies?
It's assigned its own public IP.
I did that command on the VM and tried the MySQL test again, and it's not receiving anything, nothing is happening.
I also tried on the localhost, it connected fine but the packets didn't change.
I made a php script that uses fsockopen and connecting to 3306 TCP from a remote host works.
I did that command on the VM and tried the MySQL test again, and it's not receiving anything, nothing is happening.
I also tried on the localhost, it connected fine but the packets didn't change.
I made a php script that uses fsockopen and connecting to 3306 TCP from a remote host works.
If tcpdump says no packets are received, then connecting to tcp port 3306 does not work. Connecting to localhost will not show in tcpdump, so that's as expected.
If I understand you correctly, the php script caused packets to appear at the VM, while the MySQL test did not. Did you run the php script from a host other than the one from which you're trying to access the MySQL database? If so, I would conclude that the problem might be at the client end of the connection.
Does "telnet <server ip> 3306" from the troublesome client result in packets appearing at the server end? Are you connecting to the server by DNS name, and if so, is name resolution working properly? Could there be firewall issues on the client side?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.