PDA

View Full Version : Coldfusion DSN - cannot connect



lostride
October 6th, 2010, 08:16 PM
My application cannot connect to my database. I have been able to connect Navicat without any problem.
I have created the DSN in the Helm cp for my domain. I am using 'localhost' as the server, is this correct?

Thanks in advance,
Tony Gray

Cameron L
October 6th, 2010, 08:52 PM
Hello,

Using localhost only works for mysql databases on our linux/cpanel hosting. Because your are on our coldfusion hosting, you will need to get the IP address of the mysql server and use that instead. This is because, unlike linux servers, the mysql server is a separate machine/server from the web server your site sits on. (localhost means use the same machine that the script is on roughly).

You can find the MySQL server IP address in in either HELM, or your WCP panel, depending on which you use.

In helm, it is found in the mysql section, after clicking on the database name. It will list two addresses, normally you would use the first one starting with 10.10.*.* as that is the internal address which is faster. The other one is the public IP address which you would use to connect from home, if you have your own mysql tools for instance.

In WCP, just goto the mysql section, and it will list the hostname next to the database name. This can be used for both scripts, and from connecting at home.

If you need further assistance, please contact [email protected]