Trying to get an old site up & running on a new server (EE 2) Have changed the credentials in database.php to one for the new MySQL db. However, the site errors with “Failed to connect to MySQL: Access denied for user ‘OLDUSER’@’localhost’ (using password: YES) ” with ‘olduser’ being the previous MySQL account before database.php was edited. So it looks like it’s cached somewhere, or is being overridden elsewhere. I’ve searched for this username in the php files and can’t see it anywhere else so am a little stumped. Could anyone give me any pointers? TIA.
Hmm, no can’t see one:
database.php looks like this:
<?php if ( ! defined(‘BASEPATH’)) exit(‘No direct script access allowed’);
$active_group = ‘expressionengine’; $active_record = TRUE;
$db[‘expressionengine’][‘hostname’] = ‘anon’; $db[‘expressionengine’][‘username’] = ‘anon’; $db[‘expressionengine’][‘password’] = ‘***’; $db[‘expressionengine’][‘database’] = ‘*****’; $db[‘expressionengine’][‘dbdriver’] = ‘mysql’; $db[‘expressionengine’][‘pconnect’] = FALSE; $db[‘expressionengine’][‘dbprefix’] = ‘exp_’; $db[‘expressionengine’][‘swap_pre’] = ‘exp_’; $db[‘expressionengine’][‘db_debug’] = TRUE; $db[‘expressionengine’][‘cache_on’] = FALSE; $db[‘expressionengine’][‘autoinit’] = FALSE; $db[‘expressionengine’][‘char_set’] = ‘utf8’; $db[‘expressionengine’][‘dbcollat’] = ‘utf8_general_ci’; $db[‘expressionengine’][‘cachedir’] = ‘/home/client/public_html/system/expressionengine/cache/db_cache/’;
/* End of file database.php / / Location: ./system/expressionengine/config/database.php */
The config.php is a bit too long to post, but I’ve searched it for ‘include’ and nothing there.
If I remove/rename the database.php file, I get ‘no database connection settings were found in the database config file’, so it must be looking at that file, if not honouring the contents of it.
Two things I can think of.
The login info is just wrong. You could try using the server wizard and seeing if you can connect with the same db info.
I’ve actually seen people hard code the database settings in the EE files. Seems unlikely- but you might take a look just to see.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.