Error that is getting printed out
Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 346
I have been looking through all the other questions and nothing seems to work. Still getting this error. All the info in my database.php
file matched up to my info on the mysql server that I am running on the command line. I am also using mysqld
and mysql.server start
. I have tested the connection on the command line with
mysql -h localhost -uroot -p dbname
And that seems to work on my command line, but it is giving me the error above when I am referencing it on a localhost server I have set up with the codeigniter project. What am i doing wrong? I have double and triple checked naming conventions to make sure that it isn't the issue.
Also, I am on OS X Mavericks
my code in the config file is as follows:
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = 'PASS';
$db['default']['database'] = 'dbname';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;