技术头条 - 一个快速在微博传播文章的方式     搜索本站
您现在的位置首页 --> MySQL --> 每天MySQL自动优化

每天MySQL自动优化

浏览:2213次  出处信息
[root@bbs ~]# /usr/local/mysql/bin/mysqlcheck -Aao -auto-repair -uroot -p


下面说下几个参数的含义

-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

建议继续学习:

  1. 30分钟3300%性能提升――python+memcached网页优化小记    (阅读:11854)
  2. WEB系统需要关注的一些点    (阅读:10156)
  3. 基于SSD的数据库性能优化    (阅读:7177)
  4. jQuery性能优化指南    (阅读:7146)
  5. 一次简单C程序的性能优化    (阅读:5451)
  6. mysql sql 百万级数据库优化方案    (阅读:4846)
  7. 一次神奇的MySQL优化    (阅读:4688)
  8. PHP最佳实践    (阅读:4647)
  9. Linux 64位, MySQL, Swap & Memory 优化    (阅读:4299)
  10. PHP 性能优化技巧-google    (阅读:4189)
QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
© 2009 - 2024 by blogread.cn 微博:@IT技术博客大学习

京ICP备15002552号-1