WordPress knowledge sharing

STATE [HY000] [2002] No such file or directory

One sultry afternoon, a netizen sent a message asking for help, saying that after the server was forced to restart, the pagoda panel and the website could not be opened. The only prompt that could be seen was: database connection failed: SQLSTATE [HY000] [2002] No such file or directory As shown in the figure below:

Netizens only backed up the website files before, but not the database. They were worried and even said that as long as they could back up the database, it would be OK to open a new server. After thinking about it, the database should not be lost. The problem lies in the inability to connect. After a round of searching, there was no reliable solution. Finally, I went to the pagoda panel official forum and finally found the official reply to this problem.

Lao Wei suggested that the pagoda panel is suitable for novices and Xiaobai to build a website, and supports Linux and Windows systems, Click to go directly to the pagoda website Register an account and get a free professional edition gift package of ¥ 3188 (only 1188 yuan for permanent authorization of the professional edition). New users can enjoy a professional edition experience of 0.99 yuan for 7 days.
Recommended selection of pagoda panel Alibaba Cloud Tencent Cloud The server
For more information, see Special topic of pagoda panel
Click to view NetEase Cloud Classroom "Introduction to Pagoda Linux Panel for Novice"

If the database cannot be started due to illegal shutdown, the MySQL binary log is generally damaged due to forced shutdown. The following command can be used for processing (it is recommended to stop the mysqld service first when shutting down or restarting, otherwise there is a certain probability that the database will be damaged).

Open the SSH software to connect to the VPS server and clear the binary logs:

rm -f /www/server/data/ib_*
rm -f /www/server/data/mysql-bin*

Try to start mysqld

service mysqld start

After the above two steps are completed, try again, and the pagoda panel can be opened normally. So far, everything is normal.

However, every time when he uses the military brother lnmp, he directly restarts VPS (both domestic and foreign hosts), and has never encountered similar problems. It seems that in terms of stability, the panel is not as good as the one button package of lnmp. Of course, the panel has its convenient, fast and visual features, and will be more and more popular with webmasters.

Like( one )
Article name: STATE [HY000] [2002] No such file or directory The pagoda panel and website cannot be opened
Article link: https://www.vpsss.net/2379.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.