Database Configuration in CodeIgniter — a practical guide to CodeIgniter database config with clear examples you can reuse in real projects.
CodeIgniter Tutorial Series (29/74). Prefer one article? Read the complete CodeIgniter tutorial.
Short description
Set hostname, database name, username, password, and driver. Keep credentials in `.env`.
DB .env
database.default.hostname = localhost
database.default.database = ci_app
database.default.username = root
database.default.password =
database.default.DBDriver = MySQLi
database.default.DBPrefix =
database.default.port = 3306