Hi,
I found out there are a lot of mysqld-bin.xxxxxx under /var/lib/mysql/ folder. The file name are mysqld-bin.000001 ~ 000499. And most of the file size is 1.1 GB.
How those file are created? I want to know that those are what kind of files? And can we delete? If I can delete, what kind of side effect can be happen?
Thanks.
What kind of file from /var/lib/mysql/ folder
Re: What kind of file from /var/lib/mysql/ folder
Those are mysql binary log files, you can read more about them and how to manage them here: http://serverfault.com/questions/82093/ ... -to-remove
Re: What kind of file from /var/lib/mysql/ folder
But do not delete them by hand, you need to use the mysql query to do it.
Re: What kind of file from /var/lib/mysql/ folder
I tried to solve this issue mention in this link.ssax wrote:Those are mysql binary log files, you can read more about them and how to manage them here: http://serverfault.com/questions/82093/ ... -to-remove
First I login to mysql and run the following command.
Code: Select all
SET GLOBAL expire_logs_days=7;So I backup the my.cnf file and add the SET GLOBAL expire_logs_days=7 manually. After I restart the msyqld service, all of the old mysql binary file has been deleted.
Re: What kind of file from /var/lib/mysql/ folder
Interesting..., so setting the value directly in mysql didn't work, but setting it in the my.cnf did. In any case, I am glad the issue has been resolved! I am locking this topic.
Be sure to check out our Knowledgebase for helpful articles and solutions!