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:
![](https://img.vpsss.net/wp-content/uploads/2017/07/sjkljsbbt01.png)
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.
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
![](https://img.vpsss.net/wp-content/uploads/2017/07/sjkljsbbt02.png)
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.