Reputation: 1
A PHP Error was encountered
Severity: Warning
Message: mysqli::real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES)
Filename: mysqli/mysqli_driver.php
Line Number: 203
Backtrace:
File: C:\xampp\htdocs\ciblog\application\models\Post_model.php Line: 4 Function: database
File: C:\xampp\htdocs\ciblog\index.php Line: 315 Function: require_once
Upvotes: 0
Views: 1152
Reputation: 1424
Edit the database.php file in
application/config/database.php
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root', // ADD USERNAME HERE
'password' => '', // PASSWORD
'database' => 'database_name', // DATABASE NAME
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => TRUE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array()
);
You can find more info here
Upvotes: 0