Dan904 / Plutonium-EC2-Server

0 stars 0 forks source link

Large amounts of mysql bin files #31

Open Dan904 opened 7 years ago

Dan904 commented 7 years ago

https://www.infobright.com/forums/showthread.php?5764-Disabling-MySQL-binlogs

In large customer installations, we sometimes see the MySQL binary logs growing large. This can take up significant amounts of space in the data directory. As Infobright does not directly use these logs, here are some tips on how to turn them off and/or clean out the ones you already have.

The binary logs are located under the data directory, and have names like "mysql-bin.xxxxxx" where xxxxxx is some number.

To clean them up:

1) Log into the MySQL prompt as "root"

Code: bash$ mysql-ib -u root 2) Issue the command at the mysql> prompt:

Code: mysql> reset master; If you get an error saying, "ERROR 1186 (HY000): Binlog closed, cannot RESET MASTER", this means binlogs are already disabled.

3) To disable them: Edit the /etc/my-ib.cnf file and comment out the "log-bin" line:

Code:

log-bin=mysql-bin

and restart mysqld.

Dan904 commented 7 years ago

Need to add that to /etc/my.cnf