Saturday, October 13, 2018

REMOTE CONNECTION TO MYSQL ON WAMPSERVER


REMOTE CONNECTION TO MYSQL ON WAMPSERVER





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.


No comments:

Post a Comment

Which Python course is best for beginners?

Level Up Your Python Prowess: Newbie Ninjas: Don't fret, little grasshoppers! Courses like "Learn Python 3" on Codecade...