mysqli_real_connect(): (HY000/2002): No such file

2020-02-07 17:28发布

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.

14条回答
迷人小祖宗
2楼-- · 2020-02-07 18:29

If your website was running fine and now unexpected ERROR: (HY000/2002): No such file or directory

Then you should NOT CHANGE any configuration file!

First check server error.log file, for Nginx it's located:

/var/log/nginx/error.log

Or for Apache try:

/var/log/apache2/error_log

In my case I could see PHP Fatal error: OUT OF MEMORY in error.log for nginx.

The solution: Add more RAM to server.


I tried to reboot the web server first before upgrading/adding RAM. Then I got rid of ERROR (HY000/2002) but got some ERROR 50X: Connection Error...

At this point I added 2GB RAM, rebooted the web server and all was working fine!

When the web server was up I noticed 200+ cron-jobs was stuck due to a loop bug in 1 PHP script.

So check which script is consuming memory.

查看更多
劳资没心,怎么记你
3楼-- · 2020-02-07 18:29

You just need to rename ib_logfile0 and ib_logfile1 as ib_logfile_0 and ib_logfile_1. Then your problem would be solved.

查看更多
登录 后发表回答