patternsqlMinor
Large files in wamp\bin\mysql\mysql5.5.24\data directory
Viewed 0 times
directorybinmysqllargefileswampmysql5data
Problem
I have discovered these files located in the wamp\bin\mysql\mysql5.5.24\data folder on my Windows 2008 server.
They are consuming about 22 GB on a 40 GB drive.
I am using a LMS called moodle, that may be kicking off the creation of them, I am not sure.
I am trying to determine:
-
what is creating these files?
-
can I delete them to reclaim drive space?
They are consuming about 22 GB on a 40 GB drive.
I am using a LMS called moodle, that may be kicking off the creation of them, I am not sure.
I am trying to determine:
-
what is creating these files?
-
can I delete them to reclaim drive space?
Solution
1 - what is creating these files?
Those files are called binary logs. They contain a list of all completed SQL statements you have executed. Your mysqld process created them and autorotates at 1GB. Any restart of mysqld or issuing
They got created because there is a line in my.ini that looks like this:
Note the timestamps on each file
Here is what has been going
By the way, the reason it autorotates at 1GB? The default setting max-binlog-size is 1GB.
2 - can I delete them to reclaim drive space?
As long as you do not have mysql replication installed, then yes.
First login to mysql and run
This will erase all binary logs and leave you with
Next, if you comment it out like this
and restart the mysqld process
The logs will no longer be written.
As a final step, you can then delete
Give it a Try !!!
Those files are called binary logs. They contain a list of all completed SQL statements you have executed. Your mysqld process created them and autorotates at 1GB. Any restart of mysqld or issuing
FLUSH LOGS; will close one binary log and open another They got created because there is a line in my.ini that looks like this:
log-bin=mysql-binNote the timestamps on each file
mysql-bin.000068has10/31/2012 2:13 PM
mysql-bin.000069has11/1/2012 11:13 AM
mysql-bin.000070has11/5/2012 11:51 AM
mysql-bin.000071has11/9/2012 11:50 AM
mysql-bin.000072has11/13/2012 11:13 AM
mysql-bin.000073has11/16/2012 12:05 AM
Here is what has been going
- On 10/31/2012 at 2:13 PM
mysql-bin.000068surpassed 1GB (1048576 KB)
mysql-bin.000068closed
mysql-bin.000069opened
- On 11/1/2012 at 11:13 AM
mysql-bin.000069closed due to mysql restart orFLUSH LOGS;
mysql-bin.000070opened
- On 11/5/2012 at 11:51 AM
mysql-bin.000070closed due to mysql restart orFLUSH LOGS;
mysql-bin.000071opened
- On 11/9/2012 at 11:50 AM
mysql-bin.000071surpassed 1GB (1048576 KB)
mysql-bin.000071closed
mysql-bin.000072opened
- On 11/13/2012 at 11:13 AM
mysql-bin.000072closed due to mysql restart orFLUSH LOGS;
mysql-bin.000073opened
- On 11/16/2012 at 12:05 AM
mysql-bin.000073surpassed 1GB (1048576 KB)
mysql-bin.000073closed
mysql-bin.000074opened
By the way, the reason it autorotates at 1GB? The default setting max-binlog-size is 1GB.
2 - can I delete them to reclaim drive space?
As long as you do not have mysql replication installed, then yes.
First login to mysql and run
mysql> RESET MASTER;This will erase all binary logs and leave you with
mysql-bin.000001 with 107 bytes.Next, if you comment it out like this
#log-bin=mysql-binand restart the mysqld process
C:\> net stop mysql
C:\> net start mysqlThe logs will no longer be written.
As a final step, you can then delete
mysql-bin.000001 from Windows Explorer.Give it a Try !!!
Code Snippets
log-bin=mysql-binmysql> RESET MASTER;#log-bin=mysql-binC:\> net stop mysql
C:\> net start mysqlContext
StackExchange Database Administrators Q#29748, answer score: 8
Revisions (0)
No revisions yet.