Copy link to clipboard
Copied
Hi!
I'm working on a CF project on my local machine but the DB is located on the hosting site so I have no access to their CF administrator and can't set the datasource.
So I was suggested by the hosting company to work from my local but connect the datasource to their MySQL DB remotely. I was told that I need to use certain IP address they gave me and also the database name, user name and password but I'm not sure how to set this up from my code.
Have googled for awhile and did not get any result. Is there anyone in this forum know how and willing to send example for me so I can start working?
Thank you so much
Copy link to clipboard
Copied
Hi mega_L
As you have access to the ColdFusion administrator on your local environment, you can set up the access to the remote datasource in exactly the same way as you would to a local database.
CF Data Source Name: Whatever_You_Want_To_Call_It
Database: Name_Of_The_Database_On_The_Server
Server: The IP Address provided by your hosting company
Port: As MySQL database, this should still be 3306 (but check with the hosting provider)
Username and password: as provided by your provider.
As long as the hosting provider has enabled external access to the database (which I'm assuming they have if they've sent you the connection details), you should now have access to the remote data source on your local ColdFusion install.
Copy link to clipboard
Copied
Set the datasource on your machine, but use their IP as the server address.
Do this in your local CF administrator.
Copy link to clipboard
Copied
Oh wow, that's cool, I did not expect it is that easy. Thank you so much guys!!!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more