mysqli_real_connect(): (HY000/2002): No such file or directory
PhpMyAdmin error on MacOS. I want answer I really have no idea what I need to do to resolve this.
mysqli_real_connect(): (HY000/2002): No such file or directory
PhpMyAdmin error on MacOS. I want answer I really have no idea what I need to do to resolve this.
Locate
config.sample.inc.php
Change
$cfg['Servers'][$i]['host'] = 'localhost';
into
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Save.
Then rename file and remove sample from the name.
I faced this problem on CentOS.
First I try this
Then error shows up
Then I Found this
Command this solve my problem
If you are using archlinux or Ubuntu just type the commands below:
$ cd /opt/lampp/phpmyadmin
then
$ sudo gedit config.inc.php
Then when you access the file look for the scripts below,
//$cfg['Servers'][$i]['host'] ='localhost'
remove '//' so that it remains as shown below:
$cfg['Servers'][$i]['host'] ='localhost'
Then change the 'localhost' to '127.0.0.1' and the script should turn as shown below:
$cfg['Servers'][$i]['host'] ='127.0.0.1'
Get back to your browser and type http://127.0.0.1/phpmyadmin/
If it is still refusing
You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
so then get back to the same file config.inc.php you were editing and do as follows:
$ cd /opt/lampp/phpmyadmin
then
$ sudo gedit config.inc.php
search for the script below
$cfg['Servers'][$i]['password'] =''
Fill the password with your root password
$cfg['Servers'][$i]['password'] ='your_password'
And it Should Work. Happy hacking friends.
i'm trying this before
then
find this,
if there is
localhost
change it to127.0.0.1
I checked again
http://localhost/phpmyadmin/
mysqli said :
i'm opening again
config.inc.php
and i foundFill the password with your password
It worked for me. It may work for you too.
Maybe your SQL server has been stopped
or
and use
service mysql status
to check statusFirst of all, make sure the mysql service is running:
you will see an output like this if is running:
then change localhost to 127.0.0.1 in config.inc.php
The default password for "root" user is empty "" do not type anything for the password
If it does not allow empty password you need to edit config.inc.php again and change:
The problem is a combination of config settings and MySQL not running. This was what helped me to fix this error.