left header graphic The Network People
Solutions for Hosting Providers
right header graphic

mrm-changes home : internet : sql : mrm : mrm-docs mrm-faq


NAME

        mysql_replicate_manager.pl - Mysql Replication Manager


SYNOPSIS

        A handy tool to help manage replicated MySQL servers.


DESCRIPTION

        Matt Simerson, Unix Systems Engineer. I have several clusters of
        replicated MySQL clusters that I manage. Some are geographically
        redundant, some are used strictly for load balancing. This
        script is VERY useful for me and my co-workers.
        In order to use this program, you must have MATT::Bundle installed.
        See http://www.tnpi.biz/computing/perl/MATT-Bundle

Grant

        Run the grant statement necessary to to set up a MySQL master
        This runs the GRANT query that is necessary for setting up MySQL replication. See
        http://www.mysql.com/doc/en/Replication_HOWTO.html for more information. It logs
        into the MySQL master server and executes the command appropriate for the version
        of MySQL that you are using.

Backup Databases

        Use this option to back up your mysql databases
        mysql_replicate_manager -b [-d backupdir]
        The default location for backups is /var/backups/mysql. If you want them stored
        elsewhere configure then set backupdir = /path/to/backups in  your .my.cnf (as
        shown in the FAQ) or pass it via -d on the command line.
        You will need to have cronolog, gzip, and mysqldump installed in a "normal" 
        location. Your backups will be stored in a directory based on the date, such
        as /var/backups/mysql/2003/09/11/mysql_full_dump.gz. Make sure that path is
        configured to be backed up by your backup software.

Dependencies

        In order to use this program, you must have MATT::Bundle installed.
        See http://matt.simerson.net/computing/perl/


AUTHOR

        Matt Simerson <matt@cadillac.net>


BUGS

        None known. Report any to author.


TODO

        Add MySQL slave promotion feature
        Make restoring a failed slave brain dead easy
        Documentation, documentation, documentation
        Add commit/rollback support where appropriate
        check $sth->err and report any premature returns


SEE ALSO

        http://matt.simerson.net/computing/sql/mrm
        http://matt.simerson.net/computing/sql/mrm/faq.shtml


COPYRIGHT

        Copyright 2003, Matt Simerson. All Right Reserved.


Last modified on 4/27/05.