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
Easy installation of opencv2: conda install --cha...
This article shares the installation steps of MyS...
Here I use samba (file sharing service) v4.9.1 + ...
Table of contents Why do we need Docker? Docker d...
Table of contents Stabilization Introduction Anti...
1. IT Mill Toolkit IT Mill Toolkit is an open sou...
Table of contents Install jupyter Docker port map...
The specific code for using jQuery to implement t...
Docker installation 1. Requirements: Linux kernel...
K8s k8s is a cluster. There are multiple Namespac...
Among classic color combinations, probably no one...
What is a web page? The page displayed after the ...
Preface We all know that MySQL uses server-id to ...
1. Log4j for log segmentation 1) Prepare three pa...
Introducing vue and vue-router <script src=&qu...