• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Error connecting to DB in CF11, please help?

Contributor ,
Aug 27, 2014 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

254

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
community guidelines
Adobe Employee ,
Sep 01, 2014 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

Votes

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
community guidelines
Community Expert ,
Sep 02, 2014 Sep 02, 2014

Copy link to clipboard

Copied

LATEST

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>

Votes

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
community guidelines
Resources
Documentation