AleCat83
AleCat83

Reputation: 1493

Remote conenction to mysql server database from wamp windows

I'm developing a website that needs to conenct from localhost(windows WAMP) to a remote mysql server. The remote mysql server is aleady enabled to allow remote connection to my ip and all work fine on my (tested on mac os and linux machine). On windows my scripts are able to access to mysql servers on localhost or local network but can't access the remote server. I've also disabled the firewall but nothing happen. Can someone help me?

Thank you

Upvotes: 0

Views: 15467

Answers (2)

Edwin T. Ayernor
Edwin T. Ayernor

Reputation: 101

This is a typical firewall issues if you are using Windows OS particularly windows 7 or 8.

Disabling your firewall from the Antivirus on your server (where your wamp is installed) might not help.

follow this steps:

  1. Go to the control panel of your Server (wamp server PC)
  2. Go System and Security
  3. Choose Windows Firewall
  4. Choose Advance Settings
  5. Choose Inbound Rule
  6. Choose New Rule - New Inbound Rule Wizard will pop up
  7. Choose Port and click next
  8. Choose TCP and click next
  9. Enter 80, 3306 (These are default ports respectively for Apache and Mysql servers on wamp) if you have changed them on your wamp server PC then indicate the appropriate ports
  10. Choose Allow the Connection
  11. Check or uncheck whether you will allow this ports on Private, Public or Domain Network
  12. Give the rule a name and click finish

Upvotes: 10

RiggsFolly
RiggsFolly

Reputation: 94642

In your Joomla sites root folder there is a file called configuration.php

In there are lots of config params but these are what you need to check for this situation

public $dbtype = 'mysqli';
public $host = 'localhost';
public $user = 'joomla25user';
public $password = 'joomla25pass';
public $db = 'joomla25';
public $dbprefix = 'j25_';

Specifically you need to check

public $host = 'localhost';

This should be changed to the ip address of the server running this remote MySQL server

Upvotes: 0

Related Questions