Setting Database Configurations in Codeigniter very tiny task , just open database.php within applicationconfig. Set config like below , here database user “root”, password “”(no password), DB Name “db_name”.
if you want to disable persistent connnect just change
$db['default']['pconnect'] = TRUE; to
$db['default']['pconnect'] = FALSE;
if you want to Hide(disable) Database Error just change
$db['default']['db_debug'] = TRUE; to
$db['default']['db_debug'] = FALSE;
just like above changes to the configuration values you can change any of the DB config values(settings) any time to the config array.
Here the sample database.php script
I hope this tutorial helps you please don’t forget to give us your feedback in comments.
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.
I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.