I had uploaded my website to server and then I tried to access, but the code igniter returns me that error that I don't find any answer. Why is this happening?
My config database is set like:
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'netservice',
'password' => '*********',
'database' => 'valedastrutas',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => FALSE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE,
);
MySQL connection driver does not get any meaningful server at the location of localhost. So use,
'hostname' => '127.0.0.1'
rather than
'hostname' => 'localhost'
I've got this error
mysqli::real_connect(): (HY000/2002): No such file or directory
from PhpMyAdmin running on my Mac Mojave, with MySQL server also running on my Mac.
Fixed it by editing PhpMyAdmin/config.inc.php
and changed the line:
$cfg['Servers'][$i]['host'] = 'localhost';
to
$cfg['Servers'][$i]['host'] = '127.0.0.1';
in phpmyadmin version 5.1.0 all lang., the config. file is located in libraries/config.default.php
do the following change:
$cfg['Servers'][$i]['host'] = 'localhost';
to
$cfg['Servers'][$i]['host'] = '127.0.0.1';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With