您好,欢迎来到微蜜娱乐。
搜索
您的当前位置:首页每天MySQL自动优化_MySQL

每天MySQL自动优化_MySQL

来源:微蜜娱乐


bitsCN.com

下面说下几个参数的含义


-a, --analyze 分析 [Analyze given tables]
-o, --optimize 优化 [Optimize table]
-A, --all-databases 所有的数据库 [Check all the database]
--auto-repair 自动修复 [If a checked table is corrupted, automatically fix it. Repairing will be done after all tables have been checked, if corrupted ones were found]

vi /opt/shell/mysql_opt.sh

/usr/local/mysql/bin/mysqlcheck -Aao -auto-repair -uroot -p


加入 crontab


* * */1 * * /opt/shell/mysql_opt.sh

bitsCN.com

Copyright © 2019- wwmetro.com 版权所有

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务