Last update at :2024-06-21,Edit by888u
When many of our webmasters use VPS hosts, they will use one-click installation packages to build the system, and then set up their own websites. If our website runs a lot of data, we will find that the disk is full after using it for a period of time. is full, but the content of our website is not that large, and if we find that 502 error prompts often appear after installing the LNMP system, this is mostly due to our MYSQL log files filling up our disk space, and we need to clean it up.
We can clean the MYSQL log file through the following command:
rm -f /usr/local/mysql/var/mysql-bin.*
Then we restart our VPS, if LNMP is used:
/root/lnmp restart
In this way we delete the redundant junk log files, and then if we need to prevent the generation of these logs, we can do the following.
Find the /etc/my.cnf file
log-bin=mysql-bin
binlog_format=mixed
Comment out the two lines above by adding \\"#\\" in front of them. In this way, MYSQL log files will not be generated. I suggest you keep it so that you can see the problem if there are any errors. If it is full, it is not troublesome to clean it manually.
Recommended site searches: foreign servers, registration password retrieval, foreign free asp space, US website server, website server rental, dynamic IP server, fast website registration, US free hosting, registration-free space and free network, how to register a domain name,
发表评论