Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

mysqli::real_connect(): (HY000/2002): No such file or directory

Locate config.sample.inc.php

Change

$cfg['Servers'][$i]['host'] = 'localhost';
into

$cfg['Servers'][$i]['host'] = '127.0.0.1';
Save.

this happen becuse you may using multipe mysql server on system and
php did not recognized the localhost 

and mysql default port is always 3306 

try to connect via terminal first

Run =>>
mysql -h 127.0.0.1 -P 3306 -uroot -p

then password 

you are in if password is correct 

Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #No #file #directory
ADD COMMENT
Topic
Name
2+8 =