Remote Connection to MySQL on WampServer
Posted on April 30, 2015.

After spending a couple hours trying to figure out how to connect remotely to MySQL on WampServer, I finally figured it out. The web didn’t offer one comprehensive solution to the problem, so I decided to post the steps I took which enabled me to finally connect.

  1. Install WampServer on your server computer
  2. Open the my.ini file located at "\wamp\bin\mysql\mysql5.6.17". Note the 5.6.17 may differ based on your version.
    1. Find the line that says [mysqld].
    2. Add this code after this line: bind-address = [server_ip]
    3. Replace [server_ip] with the static IP address of your server.
  3. Open config.inc.php located at "\wamp\apps\phpmyadmin4.1.14". Note the 4.1.14 may differ based on your version.
    1. Locate the following code: $cfg[‘Servers’][$i]['host'] = '127.0.0.1'
    2. Change the 127.0.0.1 to the static IP address of your server.
  4. Configure your firewall to allow connection through the default Apache and MySQL ports.
    1. Open the control panel on the server computer
    2. Select System and Security –> Windows Firewall –> Advanced Settings
    3. In the left pane, select “Inbound Rules” and then choose “New Rule…” on the right pane.
    4. Select “Port” and click “Next”
    5. Select “TCP” and enter the default ports for Apache and MySQL (80, 3306) in the text box next to "Specific local ports:" Note: be sure to change these if you changed them in your wampserver (i.e. my.ini).
    6. Choose “Allow the Connection” and click “Next”
    7. Check all the domains you want to allow these ports (i.e Domain, Private, Public)
    8. Specify a name for this rule and click “finish”
  5. Restart all services and now you should be able to connect to your database.

Hello,

I would like to ask that this configuration is needed to be set in the server computer?

Currently I am using my own personal computer and wish to connect to my server, I followed your steps but did not work

 

Thank you very much if respond is given

– January 21, 2021 11:38 PM by Max Tan

It has been over 5 years since I posted this. I am assuming WAMPServer has changed since then. I no longer use WAMPServer so you will need to find instructions somewhere else. Sorry.

– January 22, 2021 09:01 AM by Dustin Ormond