Highlighted

Error connecting to DB in CF11, please help?

Contributor ,
Aug 27, 2014

Copy link to clipboard

Copied

I'm getting the following error message in CF11 when  trying to access my MYSQL database on a local machine:

Could not create connection to database server. Attempted reconnect 3 times. Giving up.


I created the DB in the admin page. I also verified the DB. I can open the database in the command prompt. The only thing I can't do is connect it in CF11. Everything tells me the DB is connected and working fine, just not when I view the data in the web page. Any suggestions would be appreciated.


EDIT: forgot to mention the rest of the error message, I hope it helps:


The error occurred in D:/inetpub/wwwroot/Applewood Community_03/textareaTest.cfm: line 9
   Called from using password: line -1
  Called from using password: line -1

Views

218

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Error connecting to DB in CF11, please help?

Contributor ,
Aug 27, 2014

Copy link to clipboard

Copied

I'm getting the following error message in CF11 when  trying to access my MYSQL database on a local machine:

Could not create connection to database server. Attempted reconnect 3 times. Giving up.


I created the DB in the admin page. I also verified the DB. I can open the database in the command prompt. The only thing I can't do is connect it in CF11. Everything tells me the DB is connected and working fine, just not when I view the data in the web page. Any suggestions would be appreciated.


EDIT: forgot to mention the rest of the error message, I hope it helps:


The error occurred in D:/inetpub/wwwroot/Applewood Community_03/textareaTest.cfm: line 9
   Called from using password: line -1
  Called from using password: line -1

Views

219

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 27, 2014 0
Adobe Employee ,
Sep 01, 2014

Copy link to clipboard

Copied

If you are able to create a datasource within the CF admin, that means, the DB connection is verified and connected.

It seems like that the issue lies in the textareaTest.cfm. Can you share the code within the page? Alternatively, you can try dumping a sample query and see if it works.

Regards,

Anit Kumar

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 01, 2014 0
BKBK LATEST
Adobe Community Professional ,
Sep 02, 2014

Copy link to clipboard

Copied

You may have configured the datasource username and password in the Coldfusion Administrator. So, omit them from the cfquery tag, and use just

<cfquery name="q" datasource="myDSN">

</cfquery>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 02, 2014 0