LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   MySQL not allowing remote connections, iptables has been removed. (https://www.linuxquestions.org/questions/linux-newbie-8/mysql-not-allowing-remote-connections-iptables-has-been-removed-947346/)

snooze1 05-29-2012 04:54 AM

MySQL not allowing remote connections, iptables has been removed.
 
I have installed MySQL, php, and phpMyAdmin. I'm setting up a user that allows from '%' (any) and it's not working. I created a DB and it's not allowing me to remotely connect, I have gotten to the point where I have just completely removed iptables and restarted.

Using Debian.

fukawi1 05-29-2012 05:36 AM

I would start by checking if mysql is listening as it should be using netstat.
Code:

netstat -tnlp | grep 3306
And check the "bind-address" directive in my.cnf, making sure mysql is listening on the right address..

Since you don't say how you are trying to connect remotely, and I am unfamiliar with phpMyAdmin, all I can really suggest is to try getting back to basics, try telnet'ing the mysql server to try and isolate whether the problem is phpMyAdmin not connecting or if mysql is not listening.

snooze1 05-29-2012 05:47 AM

Quote:

Originally Posted by fukawi1 (Post 4690091)
I would start by checking if mysql is listening as it should be using netstat.
Code:

netstat -tnlp | grep 3306
And check the "bind-address" directive in my.cnf, making sure mysql is listening on the right address..

Since you don't say how you are trying to connect remotely, and I am unfamiliar with phpMyAdmin, all I can really suggest is to try getting back to basics, try telnet'ing the mysql server to try and isolate whether the problem is phpMyAdmin not connecting or if mysql is not listening.

I'm trying to connect from a php server. Running that netstat it gives me

Code:

tcp        0      0 23.19.48.147:3306      0.0.0.0:*              LISTEN     
1468/mysqld

I have binded the server on the above IP aswell in the my.cnf and turned off skip-networking, and it's still not working unfortunately.

fukawi1 05-29-2012 05:55 AM

You still haven't said how you are trying to connect (method, commands, error messages, etc)

Try port scanning the server from the client, and telneting, if the former shows port 3306 open, and the latter connects, then i would suggest installing and running mysql (client) on the client machine, and trying to connect directly with mysql..

If all that works, I would say the problem lies with the configuration of phpMyAdmin.

I am not an expert on mysql or phpMyAdmin, so aside from the network connectivity side of things, I cant really help.


All times are GMT -5. The time now is 07:19 PM.