I have created a db file in my directory of the webpage with name my_db.db. I am using phpstorm and the db file is correctly configured.
Now I am finding problems on what connection settings to set in codeigniter so that I can connect but I get a database error:
Unable to connect to your database server using the provided settings.
Filename: core/CodeIgniter.php
Line Number: 518`
My connection settings from codeigniter are as follows:
$db['default'] = array(
'dsn' => '/db/my_db.db',
'hostname' => 'localhost',
'username' => '',
'password' => '',
'database' => 'my_db',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
This is a local site and thus no username and password are available for the the connection that is why there is nothing.
How can I correctly connect as these settings are not correct.
The structure of where the db is found relative to the index.php is as follows:
index.php
db/my_db.db