On Which port phpMyAdmin connect to remote database
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.
Related videos on Youtube
antoniomerlin
Updated on September 18, 2022Comments
-
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 over 7 yearsi have already did it.
sudo firewall-cmd --zone=public --add-port=3306/tcp --permanent
still not able to connect -
antoniomerlin over 7 yearsI'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 over 7 yearsTo make sure did you replace ''host'' and ''user'' with the correct values for your Mysql?
-
Alexandre Roux over 7 yearsAlso during the installation did you secure your MySQL by using : sudo mysql_secure_installation
-
antoniomerlin over 7 yearsyes i did that while installing mysql
-
Alexandre Roux over 7 yearsOk cool, so now could you open a mysql connection using your root user?
-
antoniomerlin over 7 yearsyup i can but just the problem i am facing is to connect server phpmyadmin to a remote database.
-
Alexandre Roux over 7 yearsI'm sorry but do you mean that from your Centos 7 you cannot : mysql -h remoteDatabaseHost -u root -p?
-
antoniomerlin over 7 yearsyes 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.