1

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?

1

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.