These large files are MYSQL BINARY LOG, stores query event such as add, delete and update in a very details way. The Binary Log is used for two main purposes:
- For replication, the binary log on a replication source server provides a record of the data changes to be sent to replicas. The source sends the events contained in its binary log to its replicas, which execute those events to make the same data changes that were made on the source.
- Certain data recovery operations require use of the binary log. After a backup has been restored, the events in the binary log that were recorded after the backup was made are re-executed. These events bring databases up to date from the point of the backup.
There are several ways to remove or clean up MySQL Binary Log, it’s not recommend to clean up the file manually, you need to use PURGE BINARY LOGS statement to safely purge binary log files:
- On each replica, use
SHOW SLAVE STATUS
to check which log file it is reading.
- Obtain a listing of the binary log files on the replication source server with
SHOW BINARY LOGS
.
- Determine the earliest log file among all the replicas. This is the target file. If all the replicas are up to date, this is the last log file on the list.
- Make a backup of all the log files you are about to delete. (This step is optional, but always advisable.)
- Purge all log files up to but not including the target file.
Since you have not set up a backup, do the following:
you can also remove the binary older than a specific date, such as 2019-04-02 22:46:26,
PURGE BINARY LOGS TO 'mysql-bin.010';
PURGE BINARY LOGS BEFORE '2019-04-02 22:46:26';
PURGE BINARY LOGS statement structure:
PURGE { BINARY | MASTER } LOGS {
TO 'log_name'
| BEFORE datetime_expr
}
It's directly from the official website