MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Tips and Tricks => Topic started by: MRatWork on 2013-09-23, 14:09:14

Title: [TIPS] Disable MySQL innodb log
Post by: MRatWork on 2013-09-23, 14:09:14
I have a problem in our share-hosting. MySQL (using MariaDB) not able to stop and start. What a problem is?.

Symptoms:
1. using 'innodb' as 'storage-engine' in 1 or more database
2. have 'log-bin=mysql-bin' inside '/etc/my.cnf' and or '/etc/my.cnf.d/my.cnf'
3. many files named as 'mysql-bin.*' inside '/var/lib/mysql'
4. this 'mysql-bin' files eat disk usage --> in my server until disk usage until 100%

Solutions:
1. Change 'log-bin=mysql-bin' to '#log-bin=mysql-bin'
2. restart mysql with 'sh /script/restart-mysql'
3. delete all 'mysql-bin' files with 'rm -rf /var/lib/mysql/mysql-bin.*'

-------
Note:
- log-bin only needed for 'replications' purpose
Title: Re: [TIPS] Disable MySQL innodb log
Post by: MRatWork on 2013-09-23, 14:14:21
Alternatively:
1. Still enable log-bin with 'log-bin=mysql-bin'
2. Limiting log-bin with 'expire_logs_days=10' (for 10 days) and 'max_binlog_size=100M' (for max size 100M)
Title: Re: [TIPS] Disable MySQL innodb log
Post by: Spacedust on 2013-10-05, 04:02:45
I've never used log bin ;)

Make sure to use innodb_file_per_table. This will help a lot in case of InnoDB crash and won't trash your InnoDB with previously removed databases !