[clue] MySQL Question

Jason Friedman jason at powerpull.net
Fri Nov 30 16:42:49 MST 2012


> I've inherited a complex LAMP application.
>
> A script runs nightly to dump the databases for a backup.  After the
> dumps and before emailing the results, the script issues the following
> commands on each database:
>
>  mysql -u <user> -p<password> -h <DB Server> -e "reset master"
>  mysql -u <user> -p<password> -h <DB Server> -e "flush logs"
>
> What does "reset master" and "flush logs" do to a running database?  At
> no time does the script stop and restart the instances, BTW.

>From http://linux.die.net/man/1/mysql:
• --execute=statement, -e statement
Execute the statement and quit. The default output format is like that
produced with --batch. See Section 4.2.3.1, "Using Options on the
Command Line", for some examples. With this option, mysql does not use
the history file.

Flush:  http://dev.mysql.com/doc/refman/5.0/en/flush.html.
Reset:  http://dev.mysql.com/doc/refman/5.0/en/reset-master.html


More information about the clue mailing list