Once I checked the size of the MySQL directory I figure out it has 6.9GB and mysql/data directory occupies 6.5GB out of that. There are lots of "mysql-bin
1. Stop the mysql server : /etc/init.d/mysql stop
2. Comment out "#log-bin=mysql-bin" in my.cnf
If you can't find out where is your my.cnf is then use the following command to find out the file.
find / -type f -name "my.cnf" -print
3. Then delete your "mysql-bin
Note: It would be safe if you can keep last 10 bin logs files and delete the rest.
4. Start the mysql server: /etc/init.d/mysql start
Even though the disabling of binary log is straight forward for most of the developers, most of them do not disable in there MySQL at development environment. Unintentionally our hard disk will fill with out notice. That's why I thought of highlighted this.
I got 5GB cleared from my hard disk and SQL queries get faster... Now I can store 7 movies downloaded from Torrent :))
No comments:
Post a Comment