Welcome Guest, Not a member yet? Register   Sign In
Database connection error when live on server (SOLVED)

(This post was last modified: 07-05-2017, 05:32 PM by meSmashsta.)

I configure a VirtualBox VM for my server running UBUNTU (LAMP setup) and now after putting my project on the server it fails to connect to the database.


PHP Code:
mysqli::real_connect(): (HY000/1045): Access denied for user 'usr'@'ip' (using passwordYES

my application/config/database config

PHP Code:
$active_group 'default';
$query_builder TRUE;

$db['default'] = array(
'dsn'    => '',
'hostname' => '***',
'username' => 'miko',
'password' => '***',
'database' => 'handler_monitoring',
'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
Anyway a simple database connection from a pure PHP works, I don't understand why CI wont.
Pure PHP connection that works on the server
PHP Code:
Turns out I had the wrong privileges.

Messages In This Thread
Database connection error when live on server (SOLVED) - by meSmashsta - 07-02-2017, 01:16 PM

Theme © iAndrew 2016 - Forum software by © MyBB