Skip to main content
Participant
February 12, 2013
Question

Conneting to MySQL db

  • February 12, 2013
  • 1 reply
  • 1004 views

I have a CF site I am transfering to a new hosting company. I'm having trouble connecting to the db. I did not develope this site. It seems the developer used a configuration.txt file to connect to the database. See below. The part that stands out is that there is no username and password. What is the attribute name for the username and password. I tried username: and password: but they do not work.

# The following is the configuration file for the CMS.  Lines starting with a pound sign are ignored.

# The format is: <Attribute Name>:<Attribute Value>

##############################################################

webSiteName:MySite

webSiteEmail:no-reply@mysite.com

webSiteFormRecipient:cgriffin@mysite.com

webSiteLogo:/images/logo.png

webSiteLogoHeight:124

# If cobrandLogo is set then an additional logo will be shown.  This is used for allowing clients to brand the CMS.

cobrandLogo:images/mysite.com

##############################################################

# The following variables define the external assets that will be used by the site.

# Datasource

dsn:my_site

# Collection Name (This can be a Verity of solr collection name.) 

# Comment out if the site will not have search functionality.

collectionName:robsfoundation

##############################################################

# If set to 1 then the CMS allows for multiple users to be created.

multipleUsers:1

# If set to 1 then content created by content managers must be approved by administrators before it is made live.

requireApproval:1

# If set to 1 then when a content manager makes a change to content requiring approval all administrators will be notified via email.

emailWhenContentNeedsApproval:1

# The following defines the name used for themes.

themeDefinition:Theme

# The following is a list of reserved words that can not be used for aliases.

# This list must contain the list of top level directories that are present for the site.

invalidAlias:css,files,images,inc,js,pdfs,cmsadmin,includes,tools

# Site open to the public?  1=yes 0=no

public:1

This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
February 23, 2013

It is likely that your former colleague chose to set the MySQL username and password directly in the ColdFusion administrator. Alternatively, he may even have hard-coded it, for example, in Application.cfc. Then there would have been no need for those attributes to appear again in the configuration file.

Search your application file for any mention of the datasource. Also search your code for the earliest occurrence of a query.

Participant
February 27, 2013

Yes thats the same was happened with me when I was with a android app development company and issue was not resolved.