MySQL

MySQL binary logs administration

Documentation

MySQL 8.0 Reference Manual / The Binary Log / 5.4.4 The Binary Log
https://dev.mysql.com/doc/refman/8.0/en/binary-log.html

17.1.6.4 Binary Logging Options and Variables
https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.h...

MySQL 8.0 Reference Manual / MySQL Programs / Administrative and Utility Programs / 4.6.8 mysqlbinlog — Utility for Processing Binary Log Files
https://dev.mysql.com/doc/refman/8.0/en/mysqlbinlog.html

akonadiserver and MySQL upgrades

Sometimes, akonadi will not start because a SQL upgrade is required.

DBUpdater: query error


org.kde.pim.akonadiserver: Running DB initializer
org.kde.pim.akonadiserver: DB initializer done
org.kde.pim.akonadiserver: DBUpdater: query error: "Invalid default value for 'atime' QMYSQL: Unable to execute query" " "
org.kde.pim.akonadiserver: Query was: "ALTER TABLE PimItemTable ROW_FORMAT=DYNAMIC"
org.kde.pim.akonadiserver: Target version was: 41
org.kde.pim.akonadiserver: Mandatory: true

mysql-bin log files take a lot of space

Symptom and cause

Symptom: the directory /var/lib/mysql/ is taking an increasing amount of space because of the numerous “server-bin.n” or mysql-bin.00000n files stored there.

This is because /etc/mysql/my.cnf has:

log-bin=mysql-bin

Binary logging is used for data recovery and for replication with master/slave servers.

To clear those binary log files, you must first decide whether you want/need binary logging or not.

Disable binary logging

In /etc/mysql/my.cnf:
disable log-bin and related settings as below (comment out or delete):

mysql

MySQL has a top notch documentation, so whatever you are looking for, your first stop should be here: http://dev.mysql.com/doc/

https://wiki.gentoo.org/wiki/MySQL
https://wiki.gentoo.org/wiki/MySQL/Guide
http://linux.overshoot.tv/dev-db

Syndicate content