Home > Database > Mysql Tutorial > 每天MySQL自动优化_MySQL

每天MySQL自动优化_MySQL

WBOY
Release: 2016-06-01 13:47:18
Original
939 people have browsed it

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
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template