This article describes how to disable Mysql logs to protect disk space in lnmp. For more information, see
Mysql installed in the LNMP one-click package enables Mysql logs by default. if the website reads and writes data to the database frequently, it may generate a large number of logs and occupy disk space, it is also possible that the idle space of the VPS hard disk is fully occupied and the database cannot be enabled.
The path of this tutorial appliesLNMP one-click installation package environmentAnd other environments.
To disable it, perform the following operations:
The code is as follows:
Log-bin = mysql-bin
Binlog_format = mixedbash
Note the two rows as follows:
The code is as follows:
# Log-bin = mysql-bin
# Binlog_format = mixedbash
Add the "#" comment before the two fields and save the file.
The code is as follows:
Service mysqld restartbash
Run the preceding command in SSH and restart Mysql to make the comment take effect.
The code is as follows:
/Usr/local/mysql/bin/mysql-u root-pbash
Run the preceding commands by using SSH, enter the password, and enter the MYSQL command line mode.
2) resetting an account
The code is as follows:
Reset qzkyl; # change qzkyl to the name of the target database.