mysql

Debian and MySql 5: where has 'debian-log-rotate.conf' file gone?

|

In a Debian standard installation of MySql 4, binary logs are purged automatically. The file /etc/mysql/debian-log-rotate.conf is needed to tell logrotate how many log files to keep.

Starting from MySql 5, purging of binary logs is done directly by MySql so there is no more need of debian-log-rotate.conf and the rotation is configured in the my.cnf file with the following entry:

expire_logs_days = 30 # WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian!

MySql database replication

|

The following procedure has been taken from the official MySQL web site: http://dev.mysql.com/doc/refman/4.1/en/replication.html.

First of all, the replication method here explained is also called "asynchronous", because write queries are first executed by a primary database server called Master and then (even though almost immediatly in most cases) by a secondary database server called Slave. Synchronous replication instead is a characteristic of MySQL Cluster, which will be soon the subject of the next node... I hope...

The main goals are:

  • data availability - in case of main server failure you can easily switch all your clients to the slave
  • load balancing - only SELECT queries may be sent to the slave to reduce the query processing load of the master
  • backup - you can perform database backups using a slave server without disturbing the master. The master continues to process updates while the backup is being made.
Syndicate content