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
Description: Change the carriage return in the tex...
1. Please download the Busybox source code online...
1. Connect to MySQL Format: mysql -h host address...
Table of contents 1. Subquery definition 2. Subqu...
This article introduces 5 ways to solve the 1px b...
Table of contents Introduction Instructions Actua...
1.What is margin? Margin is used to control the sp...
Table of contents 1. Short circuit judgment 2. Op...
In the latest version of Ubuntu, users no longer ...
*Create a page: two input boxes and a button *Cod...
routing vue-router4 keeps most of the API unchang...
Table of contents Overview Install Gulp.js Create...
Unique “About”-Pages A great way to distinguish yo...
Nowadays, whether you are working on software or w...
The network configuration of Host Only+NAT mode u...