CRDave
CRDave

Reputation: 9285

upload CodeIgniter site bt cpanel

I am uploading site very first.

I have used php,phpmyadmin, and CodeIgniter frame work

I have upload my all files. It is working fine on my machine but here it is giving error

A Database Error Occurred

Unable to connect to your database server using the provided settings.

Filename: core/Loader.php

Line Number: 346 

my database.php

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'lakshr5e@localhost';
$db['default']['password'] = '';
$db['default']['database'] = 'lakshr5e_groupon';
$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;

can any one help me?? If any one have link for any tutorial than please give me. Thanks in advance....

Upvotes: 0

Views: 917

Answers (2)

Syed Ahmed
Syed Ahmed

Reputation: 1645

If cpanel user name lakshr5e then your database user name lakshr5e_(dbuser). You must add user with database from cpanel > mysql databases for giving different types of statement permission like SELECT, UPDATE, INSERT etc. Config file look like :

$db['default']['username'] = 'lakshr5e_dbuser';
$db['default']['password'] = 'yourdbpassword';
$db['default']['database'] = 'lakshr5e_groupon';

I hope that will be help you.

Upvotes: 0

SwiftD
SwiftD

Reputation: 6079

It's exactly what it says on the tin - your database settings are wrong and you are looking in exactly the right place for where the problem is.

It's apparent that you have no db password set but I assume you took that out to ask the question. My suggestion is contact your hosting provider to find out exactly what your db settings should be.

It might also be worth checking your error log to confirm the issue.

It may just be that you dont need @localhost at the end of your username.

You dont need a tutorial you just need to enter the right db settings and my bet is that the problem is in one of these:

$db['default']['username'] = 'lakshr5e@localhost';
$db['default']['password'] = '';
$db['default']['database'] = 'lakshr5e_groupon';

Not in one of the settings you dont understand.

Upvotes: 1

Related Questions