Phpmyadmin has no connection to access Mysql through Apis:
As I have explained in:
mysql is a server that works by TCP, but not by HTTP, in installations like Xampp and Wamp it is not directly connected to Apache or PHP, it is actually a fully separate database server that can be installed even on a computer other than the same network or an external network that is accessible and sits on a port other than HTTP.
It doesn’t have folder navigation like HTTP servers it stays on a different port, while Apache, Ngnix, Lighttpd are usually on ports like 80, 8000, 8080, 9000, while Mysql is mostly on port 3306.
What was done in the Apache settings was to release PHPMYADMIN:
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
This means that you are accessing phpmyadmin through another computer, but it does not mean that you are accessing the TCP connection with the mysql server, because it has nothing to do with Apache.
How to free to access the mysql protocol from a different machine
Assuming it’s the same network and it’s Windows, then what you should do is release the port on the Firewall of the machine where Mysql-Sever is located, then go to Window Firewall > Rules of entry > New Rule... (upper right corner) > Door, as in the image:
Then select TCP and enter the port:
Select the option Allow connection, now on the next screen you can choose where this will apply, we usually remove public networks, because I believe that if your computer is in the office or in your home you use the Private Profile, so you should probably remove the public option that is described in the image:
It will ask for a name for the rule, it is more for you to guide and remove or disable the rule when you want, type "MYSQL", the description can leave blank, should look like this:
Ready, this way any machine on the network will be able to access the machine mysql-server, so to test go on a machine other than the machine where Mysql-server, you can use the command line telnet
(not every Windows system has this program or lets you install, usually "Windows Pro" already has), a simple test on CMD would be to type this:
telnet 192.168.157.59 3306
The port and IP must be separated by spaces, as in the image:
Then press Enter, if there is any error message it is because something is wrong in your settings, so check:
- In the firewall rules of the machine that configured the port if there is any other mysql rule that in case must be blocking access
- Check if mysql-server is started
The server has to be open, on Iptables, for example, and any other firewall. In addition the user has to be allowed to connect on this host/ip.
– Inkeliz