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.
- Install WampServer on your server computer
- Open the my.ini file located at "\wamp\bin\mysql\mysql5.6.17". Note the 5.6.17 may differ based on your version.
- Find the line that says [mysqld].
- Add this code after this line: bind-address = [server_ip]
- Replace [server_ip] with the static IP address of your server.
- Open config.inc.php located at "\wamp\apps\phpmyadmin4.1.14". Note the 4.1.14 may differ based on your version.
- Locate the following code: $cfg[‘Servers’][$i]['host'] = '127.0.0.1'
- Change the 127.0.0.1 to the static IP address of your server.
- Configure your firewall to allow connection through the default Apache and MySQL ports.
- Open the control panel on the server computer
- Select System and Security –> Windows Firewall –> Advanced Settings
- In the left pane, select “Inbound Rules” and then choose “New Rule…” on the right pane.
- Select “Port” and click “Next”
- 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).
- Choose “Allow the Connection” and click “Next”
- Check all the domains you want to allow these ports (i.e Domain, Private, Public)
- Specify a name for this rule and click “finish”
- 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