Welcome Guest, Not a member yet? Register   Sign In
MySQL Invalid DB
#1

I have been using CI for years and have configured a connection to MySQL X number of times but have been banging my head against a wall for the last 12 hrs.  I am just trying to connect to a MySQL database and am getting an Invalid DB error as soon as my project loads.  I have another project that connects to the same DB working just fine.  I even tried to copy and paste the database config file and the newer version of CI doesn't recognize the file is even there.  Here is what I have:

$active_group = 'default';


$query_builder = TRUE;


$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'foxpoint_bdxuser',
'password' => '********',
'database' => 'foxpoint_bdxfeed',
'dbdriver' => 'mysql',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE

);

I do notice that the newer version of CI constructs the DB array a little different but the connection info is the same.  Any ideas?
Reply
#2

Try removing dsn. Also try 127.0.0.1 instead of 'localhost'
Reply
#3

(06-15-2015, 09:57 AM)CroNiX Wrote: Try removing dsn. Also try 127.0.0.1 instead of 'localhost'

Thanks CroNiX.  I just figured this out a couple of minutes ago.  Somehow when I copied over the CI files, some of the database driver folders didn't transfer.  Once I moved the MySQL folder over to the database driver folder everything started working as expected.  Not sure how that happed.  Thanks again for your reply. 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB