2

My centos 7 phpMyAdmin unable to connect to remote database as i think the security policy is not allowing it (port may be disabled by firewall). As i checked the same configuration on wamp phpmyadmin its able to connect with same entry in config.inc.php. Can anyone tell on which port phpMyAdmin send request for connecting remote database so that i can enable it in centos 7 firewall.

antoniomerlin
  • 121
  • 1
  • 1
  • 4

3 Answers3

3

The default port for MySQL is 3306.

A database server (such as MySQL) is the one actually running databases and queries. phpMyAdmin is simply a utility to manage the server. Make sure the service is actually runnung.

0
  1. The server's firewall blocks your ip on port 3306 (as Brandon said the default port for MySQL). I recommend you to verify the communication by using putty or telnet and see if you can actually open a connection.

    telnet mysqlhost 3306

  2. MySQL simply doesn't allow remote connections for your username. You should be able to verify this by using :

    mysql -h host -u user -p

Alexandre Roux
  • 470
  • 1
  • 6
  • 20
0

Finally i got the solution due to this link post First i unistalled php5.4 and upgraded it to 7 then i removed phpmyadmin 4.4 and upgraded it with 4.6 (As i don't have option to disable selinux policy) still i a

mysqli_connect(): (HY000/2002): Permission denied configure local socket

i've run these command from post:-

setsebool httpd_can_network_connect on
setsebool httpd_can_network_connect_db on
setsebool mysql_connect_any on

restarted apache and mysql hola i got connection. Thanks to all for replying and helping me out.

antoniomerlin
  • 121
  • 1
  • 1
  • 4