Step 1,
Go to folder
/var/lib/mysql
Step 2:
Run:
[root@localhost mysql]# mysqladmin -u xxxx -pxxxx flush-logs
Mysql will create a new bin-log file - for my server it is mysql-bin.000014
-rw-rw---- 1 mysql mysql 22770974 Jan 6 04:02 mysql-bin.000011
-rw-rw---- 1 mysql mysql 79427070 Jan 6 04:04 mysql-bin.000012
-rw-rw---- 1 mysql mysql 109593 Jan 6 04:07 mysql-bin.000013
-rw-rw---- 1 mysql mysql 1318 Jan 6 04:07 mysql-bin.000014
-rw-rw---- 1 mysql mysql 266 Jan 6 04:07 mysql-bin.index
Step 3:
You can delete all mysql-bin log file except the latest one.
Here is the sample:
rm mysql-bin.000004 -f
rm mysql-bin.000005 -f
rm mysql-bin.000006 -f
rm mysql-bin.000007 -f
rm mysql-bin.00000* -f
Delete mysql bin log file older than 2 days
find /var/lib/mysql/mysql-bin.* -mtime +2 -exec rm {} \;
Subscribe to:
Post Comments (Atom)
-
Step 1, New a project rails new demo Step 2, Update Gemfile add paperclip, mysql2 gem, enable JavaScript runtime gem 'mysql2' ...
-
Disk is out of space [root@reyotest stat]# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda3 231825...
-
When trying to access transmission from web-browswer i got the message : 403: Forbidden Unauthorized IP Address. Either disable the IP ad...
No comments:
Post a Comment