On Which port phpMyAdmin connect to remote database

53,059

Solution 1

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.

Solution 2

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.

Share:
53,059

Related videos on Youtube

antoniomerlin
Author by

antoniomerlin

Updated on September 18, 2022

Comments

  • antoniomerlin
    antoniomerlin over 1 year

    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
    antoniomerlin over 7 years
    i have already did it. sudo firewall-cmd --zone=public --add-port=3306/tcp --permanent still not able to connect
  • antoniomerlin
    antoniomerlin over 7 years
    I've did that and verify it using telnet it's show connected and then Host is not allowed to connect to this MySQL serverConnection closed by foreign host.
  • Alexandre Roux
    Alexandre Roux over 7 years
    To make sure did you replace ''host'' and ''user'' with the correct values for your Mysql?
  • Alexandre Roux
    Alexandre Roux over 7 years
    Also during the installation did you secure your MySQL by using : sudo mysql_secure_installation
  • antoniomerlin
    antoniomerlin over 7 years
    yes i did that while installing mysql
  • Alexandre Roux
    Alexandre Roux over 7 years
    Ok cool, so now could you open a mysql connection using your root user?
  • antoniomerlin
    antoniomerlin over 7 years
    yup i can but just the problem i am facing is to connect server phpmyadmin to a remote database.
  • Alexandre Roux
    Alexandre Roux over 7 years
    I'm sorry but do you mean that from your Centos 7 you cannot : mysql -h remoteDatabaseHost -u root -p?
  • antoniomerlin
    antoniomerlin over 7 years
    yes as i using same config.inc.php on both machine windows its working but in centos 7 it;s not i think this PHP MySQL library version 5.6.31 differs from your MySQL server version 5.7.17 causing the error.