Last active
April 22, 2018 08:40
-
-
Save alexalouit/b5abf51378846462618f to your computer and use it in GitHub Desktop.
Automatically repair and optimize MySQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# cron ex: 0 0 1 * * /usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /root/scripts/mysql-health.sh >> /root/scripts/cron.log | |
/usr/bin/mysqlcheck --silent --defaults-file=/etc/mysql/debian.cnf --auto-repair --optimize --all-databases |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment