My website URL is: http://hacettepe-egitim.epizy.com
I got this error while trying to reach my website: “Message: mysqli::real_connect(): (HY000/2002): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.”
I am using codeigniter framework and this is what is in my config.php:
$db[‘default’] = array(
‘dsn’ => ‘’,
‘hostname’ => ‘sql303.epizy.com’,
‘username’ => ‘',
‘password’ => '’,
‘database’ => ‘********_hacettepe_system’,
‘dbdriver’ => ‘mysqli’,
‘dbprefix’ => ‘’,
‘pconnect’ => FALSE,
‘db_debug’ => (ENVIRONMENT !== ‘production’),
‘cache_on’ => FALSE,
‘cachedir’ => ‘’,
‘char_set’ => ‘utf8mb4’,
‘dbcollat’ => ‘utf8mb4_unicode_ci’,
‘swap_pre’ => ‘’,
‘encrypt’ => FALSE,
‘compress’ => FALSE,
‘stricton’ => FALSE,
‘port’ => ‘3306’,
‘failover’ => array(),
‘save_queries’ => TRUE
);
I dont have quite information about how hosting works but in the previous questions about the same problem, I wrote something like th remote database access is not supported in free accounts. Does this mean that I cannot make any database operations in my php code?
Thanks for the comment. I tried mysqli_connect but this time “mysqli::connect(): A connection attempt failed because the connected party did not properly respond…” showed up. I am using the db that I created in my account.
This is what is in my config file. After your recommendation I changed log_threshold to 4 which covers all messages. When I look at my log file, I see the same message. Somehow I cant actual connection error. I might have overlooked something.
$config[‘base_url’] = ‘hacettepe-egitim.epizy.com/’;
$config[‘index_page’] = ‘index.php’;
$config[‘uri_protocol’] = ‘REQUEST_URI’;
$config[‘url_suffix’] = ‘’;
$config[‘language’] = ‘english’;
$config[‘charset’] = ‘UTF-8’;
$config[‘enable_hooks’] = FALSE;
$config[‘subclass_prefix’] = ‘MY_’;
$config[‘composer_autoload’] = FALSE;
$config[‘permitted_uri_chars’] = ‘a-z 0-9~%.:_-’;
$config[‘enable_query_strings’] = FALSE;
$config[‘controller_trigger’] = ‘c’;
$config[‘function_trigger’] = ‘m’;
$config[‘directory_trigger’] = ‘d’;
$config[‘allow_get_array’] = TRUE;
$config[‘log_threshold’] = 4;
$config[‘log_path’] = ‘’;
$config[‘log_file_extension’] = ‘’;
$config[‘log_file_permissions’] = 0644;
$config[‘log_date_format’] = ‘Y-m-d H:i:s’;
$config[‘error_views_path’] = ‘’;
$config[‘cache_path’] = ‘’;
$config[‘cache_query_string’] = FALSE;
$config[‘encryption_key’] = ‘’;