设为首页 收藏本站
查看: 511|回复: 0

[经验分享] 检查和修复mysql表:mysql table is marked as crashed and last (automatic?) repair failed

[复制链接]

尚未签到

发表于 2018-9-29 09:44:59 | 显示全部楼层 |阅读模式
  This program can be used to CHECK (-c,-m,-C), REPAIR (-r), ANALYZE (-a)
  or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be
  used at the same time. Not all options are supported by all storage engines.
  Please consult the MySQL manual for latest information about the
  above. The options -c,-r,-a and -o are exclusive to each other, which
  means that the last option will be used, if several was specified.
  The option -c will be used by default, if none was specified. You
  can change the default behavior by making a symbolic link, or

  copying this file somewhere with another name, the>  mysqlrepair:   The default option will be -r
  mysqlanalyze:  The default option will be -a
  mysqloptimize: The default option will be -o
  Usage: mysqlcheck [OPTIONS] database [tables]
  OR     mysqlcheck [OPTIONS] --databases DB1 [DB2 DB3...]
  OR     mysqlcheck [OPTIONS] --all-databases
  --print-defaults        Print the program argument list and exit
  --no-defaults           Don't read default options from any options file
  --defaults-file=#       Only read default options from the given file #
  --defaults-extra-file=# Read this file after the global files are read
  -A, --all-databases Check all the databases. This will be same as
  --databases with all databases selected.
  -a, --analyze       Analyze given tables.
  -1, --all-in-1      Instead of issuing one query for each table, use one
  query per database, naming all tables in the database in
  a comma-separated list.
  --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.
  --character-sets-dir=name
  Directory where character sets are.
  -c, --check         Check table for errors.
  -C, --check-only-changed
  Check only tables that have changed since last check or
  haven't been closed properly.
  -g, --check-upgrade Check tables for version-dependent changes. May be used
  with --auto-repair to correct tables requiring
  version-dependent updates.
  --compress          Use compression in server/client protocol.
  -B, --databases     To check several databases. Note the difference in usage;
  In this case no tables are given. All name arguments are
  regarded as databasenames.
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.
  --default-character-set=name
  Set the default character set.
  -F, --fast          Check only tables that haven't been closed properly.
  -f, --force         Continue even if we get an sql-error.
  -e, --extended      If you are using this option with CHECK TABLE, it will
  ensure that the table is 100 percent consistent, but will
  take a long time. If you are using this option with
  REPAIR TABLE, it will force using old slow repair with
  keycache method, instead of much faster repair by
  sorting.
  -?, --help          Display this help message and exit.
  -h, --host=name     Connect to host.
  -m, --medium-check  Faster than extended-check, but only finds 99.99 percent
  of all errors. Should be good enough for most cases.
  -o, --optimize      Optimize table.
  -p, --password[=name]
  Password to use when connecting to server. If password is
  not given it's solicited on the tty.
  -P, --port=#        Port number to use for connection.
  --protocol=name     The protocol of connection (tcp,socket,pipe,memory).
  -q, --quick         If you are using this option with CHECK TABLE, it
  prevents the check from scanning the rows to check for
  wrong links. This is the fastest check. If you are using
  this option with REPAIR TABLE, it will try to repair only
  the index tree. This is the fastest repair method for a
  table.
  -r, --repair        Can fix almost anything except unique keys that aren't
  unique.
  -s, --silent        Print only error messages.
  -S, --socket=name   Socket file to use for connection.
  --tables            Overrides option --databases (-B).
  --use-frm           When used with REPAIR, get table structure from .frm
  file, so the table can be repaired even if .MYI header is
  corrupted.
  -u, --user=name     User for login if not current user.
  -v, --verbose       Print info about the various stages.
  -V, --version       Output version information and exit.


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-603604-1-1.html 上篇帖子: mysql客户端登录时报mysql: relocation error错误 下篇帖子: mysql的历史命令记录,~/.mysql_history,指定该文件路径
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表