I am trying to connect database using codeigniter 3 but i am facing this issue anybody please help.
A PHP Error was encountered Severity: Warning Message: mysqli::real_connect(): (HY000/2005): Unknown MySQL server host 'pd8344-001.privatesql' (2) Filename: mysqli/mysqli_driver.php Line Number: 202 Backtrace: File: /var/www/html/importdb/index.php Line: 292 Function: require_once
And
A Database Error Occurred Unable to connect to your database server using the provided settings. Filename: core/CodeIgniter.php Line Number: 500
here is my db setting in config file.
$db['default'] = array(
'dsn' => '',
'hostname' => 'pd8344-001.privatesql',
'port' => '3306',
'username' => '****',
'password' => '****',
'database' => 'db_name',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => TRUE,
'db_debug' => TRUE,//(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
);
localhost.