0

below is my database settings but that will give me following error

Unable to connect to your database server using the provided settings

$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = 'localhost:9880';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'codeignitor';
$db['default']['dbdriver'] = 'mysqli';
$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;

Can anyone tell me where i am wrong. Please help

1
  • check your database name, is it really 'codeignitor'? or is it 'codeigniter' Commented Jul 2, 2014 at 16:08

1 Answer 1

1
$db['default']['hostname'] = 'localhost:9880';

Your problem is there. That's not where the port number goes. It goes in $db['default']['port'].

$db['default']['hostname'] = 'localhost';
$db['default']['port'] = '9880';

Docs: http://ellislab.com/codeigniter/user-guide/database/configuration.html

Sign up to request clarification or add additional context in comments.

1 Comment

both have same result

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.