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. Download, install and configure mysql-8.0.15 1...
HTML5 is the next version of the HTML standard. M...
Give time time and let the past go. In the previo...
Table of contents How to rename MySQL database Th...
Generally, on national days of mourning, days of ...
This article mainly introduces the typing effect ...
When developing a backend management project, it ...
After installing MySQL, you will find that the ro...
Table of contents 1. What is virtual dom? 2. Why ...
This article example shares the specific code of ...
Original article: Ultimate IE6 Cheatsheet: How To...
How to solve the problem of 1045 when the local d...
Installation environment: CentOS7 64-bit MINI ver...
A composite index (also called a joint index) is ...
1. What are CSS methodologies? CSS methodologies ...