MySQL 一般Mysql数据库维护建议

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7478849/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 21:06:57  来源:igfitidea点击:

General Mysql database maintenance advice

mysqldatabase

提问by Chris Muench

I have about 40 databases with the same schema. What can I so to ensure these databases run smoothly?

我有大约 40 个具有相同架构的数据库。我怎样才能确保这些数据库顺利运行?

Should I be optimizing tables regularly? How can I detect table crashes?

我应该定期优化表格吗?如何检测表崩溃?

回答by Dennis

As described in detail within the below article, the bare minimum actions you should perform include,

正如下面文章中详细描述的,您应该执行的最低限度的操作包括,

  1. database backup
  2. check table integrity for errors
  3. optimize tables (varies between MyISAM and InnoDB)
  4. analyze
  1. 数据库备份
  2. 检查表完整性是否有错误
  3. 优化表(在 MyISAM 和 InnoDB 之间有所不同)
  4. 分析

http://www.laurencegellert.com/2011/07/mysql-maintenance-tasks-for-innodb-with-mysql-5-1/

http://www.laurencegellert.com/2011/07/mysql-maintenance-tasks-for-innodb-with-mysql-5-1/