AngeloS
AngeloS

Reputation: 5586

Trying to connect Coldfusion 9 to a MYSQL Datasource that was installed via MAMP (free) is throwing an error

I am trying to connect Coldfusion 9 to a MYSQL Database that was installed by MAMP (free not Pro) with the following parameters:

CF Data Source Name: MyDatasource

Database: MyDatabase

Server: localhost

Port: 8889

Username: root

Password: root

In the coldfusion Administrator I can successfully connect to this database. However, when I try to display a .cfm page that has a connection to that datasource, this error is thrown:

Error Executing Database Query.
Could not create connection to database server. Attempted reconnect 3 times. Giving up. 

Any ideas??

Any help would be immensely appreciated!!

edit

this is what MAMP wants me to use and it did create a successful connection in CF Admin.

enter image description here

Upvotes: 0

Views: 1497

Answers (2)

AngeloS
AngeloS

Reputation: 5586

So, after searching and trying to figure out what is going on, I decided to check my Application.cfm file, and sure enough, I have global connection strings for all of my queries. One of those strings was the DB password, which was not set to "root".. Thank you for your help and I apologize for the stupid question..

Upvotes: 0

Sean Coyne
Sean Coyne

Reputation: 3884

In the CF admin, if you click "Verify" it shows a successful connection? Usually MySQL databases are on port 3306 not 8889. Are you sure you have the correct settings?

Upvotes: 1

Related Questions