grot - Gray’s Rotation Tool for MySQL binary logs
Grot rotates MySQL binary log files on replication master server. It works by first determining what slaves are connected to the server. Then it connects to each slave and determines what master log file it currently uses. Finally, it removes those logs on master that are older than the oldest of logs used by slaves.
Normally, grot is executed as a cron job. It is not necessary to run it on the master server, it may as well be run on any machine that can connect to the master SQL.
An account must be set up on master and each of the slaves for grot to operate. The account on master must have the SUPER, PROCESS and RELOAD privileges. However, the latter is not necessary if you use the --no-flush command line option.
The slave accounts must be granted the REPLICATION CLIENT privilege.
grot uses configuration files to obtain the connection parameters and account credentials of the master and slave servers. See below for a descripton of these.
The following options modify the program’s behavior:
Increase verbosity level. Multiple instances of this option are allowed.
Do not actually rotate the logs, only print what would have been done.
Do not flush logs after rotating.
Keep NUMBER logs before the oldest one.
The following options set the connection and account parameters of the master server. They override the corresponding settings from the con- figuration files:
Set host name or IP address of the master MySQL server.
Set password of the MySQL user.
Set port number of the master MySQL server, if it differs from the default 3306.
Set socket file name.
Set MySQL user name. This user must have the following privi- leges: PROCESS, SUPER.
Following are the informational options:
Give a concise help list.
Give a short usage message.
Print program version.
grot reads its configuration from the following files:
Default MySQL configuration file. grot attempts to read master server configuration from sections grot and client.
Site-wide grot configuration file. See grot.cfg(5).
Per-user configuration file. The tilde (\~) here stands for the user home directory. See grot.cfg(5).
Report bugs to <gray@gnu.org.ua>.