View Single Post
Old 11-27-2013, 11:16 AM   #2
Regular_John
First Line Centre
 
Regular_John's Avatar
 
Join Date: Feb 2010
Location: Calgary
Exp:
Default

It varies from site to site & could be dependant on your CMS (eg: wordpress/drupal) but typically you'll have some variation of of config.php in the root of your site (it's probably wp-config.php if we're talking wordpress).

Anyways within that config file you'll typically have the following (or something like it) to define your database name, url/host, as well as a username/password for that database:

---------------------------------------------

define('DB_NAME', 'newsitedatabase'); /* Name of your new database /

/** MySQL database username */
define('DB_USER', 'username'); /* Username for database */

/** MySQL database password */
define('DB_PASSWORD', '123123'); /* Password for database */

/** MySQL hostname */
define('DB_HOST', 'localhost'); /* URL for the base, localhost is common, but not always the case */

---------------------------------------------


Your best bet may be to do a site wide search for something like DB_HOST to see where it's buried in your particular site.
Regular_John is offline   Reply With Quote
The Following User Says Thank You to Regular_John For This Useful Post: