I have one computer in that MySQL is install and that have a static IP and that is connect to internet. How to access the MySQL database in that pc in another pc over internet?
2 Answers
In the config.inc.php file of PHPMyAdmin set the following line
Original:
$cfg['Servers'][$i]['host'] = 'localhost';
Your version:
$cfg['Servers'][$i]['host'] = 'your_servers_static_public_ip';
Set your_servers_static_public_ip to the public IP address of your server.
If you are using a firewall then you need to remember to open the port 3306 in your firewall to allow remote MySQL requests to reach MySQL server.
Comments
Here is a section on connecting to MySQL from the manual.
So, you would use --host and --port.
Also, you would need to configure your firewall to let this traffic pass though, and also possibly the MySQL server to allow connections from external IPs.