Full Access Remote Database Connection
Posted by: fasterisbest (---.sdsl.bell.ca)
Date: February 06, 2019 08:40PM

Hello,

I am running a very small local web-based / browser-based customer sign up platform. At the moment it is running on Wamp.

I am trying to connect to a database on Sever A on a local network running wampserver 3.1.4. I want to connect to the database on server A to populate a list of data on Server B. I want Sever B to have full access to the DB on Sever A.

From what I have researched I need to enable "Remote MySql" and allow the IP of Server B. However, this exact method is not possible with Wamp (it seems) as it seems to be a cPanel thing.

I understand how to write PHP script to connect to the DB remotely. I just don't understand how to allow access from a remote machine running its own instance of Wamp. If I allow the IP of the Sever B in my vhosts.conf script is that enough to allow it access to the Server A database?

Can anyone explain to me how to configure full access the DB on Sever A from Server B or lead me to an online resource?

Thanks for any help.

Options: ReplyQuote
Re: Full Access Remote Database Connection
Posted by: RiggsFolly (Moderator)
Date: February 06, 2019 11:19PM

Hi,

All you need to do is create a user account on the MySQL on Server B that is allowed to connect from Server A

Then in your PHP code on Server A you use the ip address of Server B instead if localhost in the connection call.

You do not want to change anything in vhosts.conf as that is to do with APache and not MySQL

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Full Access Remote Database Connection
Posted by: fasterisbest (---.dsl.bell.ca)
Date: February 07, 2019 05:47PM

Thank you. That worked.

Options: ReplyQuote


Sorry, only registered users may post in this forum.