Method 1: SET GLOBAL general_log = 'OFF'; RENAME TABLE mysql.general_log TO mysql.general_log2; DELETE FROM mysql.general_log2; Note: When DELETE FROM mysql.general_log2 is executed to delete table data, it is found that the operating system data file still exists. You need to manually delete the data file and then continue with the following data operation steps OPTIMIZE TABLE general_log2; RENAME TABLE mysql.general_log2 TO mysql.general_log; SET GLOBAL general_log = 'ON'; This method takes a long time Method 2: SET GLOBAL general_log = 'OFF'; Find the general_log file and execute cat /dev/null > general_log.csv I found that the size was also released, which was much faster than the previous one. Method 3: You can add it to the configuration file my.conf: general_log=1 general_log_file = '/data/mysql/general_log.CSV' Put the file on a larger disk The above is all the knowledge points introduced this time. Thank you for your learning and support for 123WORDPRESS.COM. You may also be interested in:
|
<<: A brief talk about JavaScript parasitic composition inheritance
>>: Linux echo text processing command usage and examples
1. What is In react applications, event names are...
Problem: The null type data returned by mybatis d...
sudo configuration file The default configuration...
Installation environment: CAT /etc/os-release Vie...
Set Anchor Point <a name="top"><...
background When working on the blockchain log mod...
Overview As for the current default network of Do...
What is an index? An index is a data structure th...
Preface Engineers working in the Linux environmen...
The following command is often used: chmod 777 文件...
1. The effect diagram implemented in this article...
Set Tomcat to automatically start the service: I ...
Table of contents jQuery's $.ajax The beginni...
Table of contents 1. Import files 2. HTML page 3....
Table of contents 1. Installation and operation o...