Specify the location of the log in the configuration file.
The windows:windows configuration file is My.ini, usually under the MySQL installation directory or c:windows.
The Linux:linux configuration file is my.cnf, usually under/etc.
You can also use the following command to check (if not lnmp, the path may be different):
The code is as follows |
Copy Code |
Du-h--max-depth=1/usr/local/mysql/var/* |
If you see a large number of large files, and named mysql-bin.000014, you also need to close the log file, because you do not know which day they will put your VPS hard drive full.
Use WinSCP to remove these files.
How to close:
The code is as follows |
Copy Code |
Vi/etc/my.cnf |
Found it:
The code is as follows |
Copy Code |
Log-bin=mysql-bin Binlog_format=mixed |
Comment out these two lines and precede with #
and then save.
Finally, use the following instructions to restart the next lnmp. Wrap
The code is as follows |
Copy Code |
/ROOT/LNMP restart |
There's another way in Linux
turn off the MySQL log feature
1, in MySQL
The code is as follows |
Copy Code |
[Root@localhost ~]# mysql-u root-p Enter Password: |
2. View Log file
The code is as follows |
Copy Code |
Mysql> show master logs; |
There will be a lot of mysql-bin.0000* files. These are all log files,
Note: If error 1381 (HY000) is present: You are the not using binary logging means your log file is closed.
3. Close MySQL log file
The code is as follows |
Copy Code |
mysql> Reset Master; Close Log
Mysql> show master logs; See if there are any more logs
Mysql> exit; Bye |
4, modify the MySQL configuration file my.cnf. Find Log-bin=mysql-bin, binlog_format=mixed in front of the comment can
5. Restart MySQL OK