文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

MySQL 8.4 参考手册 / 17 InnoDB 存储引擎 / 17.20 InnoDB 故障排除 / 17.20.1 InnoDB I/O 问题故障排除
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

17.20.1 排查 InnoDB I/O 问题17.20.1 Troubleshooting InnoDB I/O Problems

排查 InnoDB I/O 问题的步骤取决于问题发生的时间:是在 MySQL 服务器启动期间,还是在 DML 或 DDL 语句由于文件系统级别问题失败期间的正常操作中。The troubleshooting steps for InnoDB I/O problems depend on when the problem occurs: during startup of the MySQL server, or during normal operations when a DML or DDL statement fails due to problems at the file system level.

初始化问题Initialization Problems

如果在 InnoDB 尝试初始化其表空间或日志文件时出现问题,请删除 InnoDB 创建的所有文件:所有 ibdata 文件和所有重做日志文件 (#ib_redoN 文件)。如果您创建了任何 InnoDB 表,也请从 MySQL 数据库目录中删除任何 .ibd 文件。然后再次尝试初始化 InnoDB。为了更方便地排查问题,从命令提示符启动 MySQL 服务器,以便看到发生了什么。If something goes wrong when InnoDB attempts to initialize its tablespace or its log files, delete all files created by InnoDB: all ibdata files and all redo log files (#ib_redoN files). If you created any InnoDB tables, also delete any .ibd files from the MySQL database directories. Then try initializing InnoDB again. For easiest troubleshooting, start the MySQL server from a command prompt so that you see what is happening.

运行时问题Runtime Problems

如果 InnoDB 在文件操作期间打印操作系统错误,通常该问题有以下解决方案之一:If InnoDB prints an operating system error during a file operation, usually the problem has one of the following solutions:

  • 确保 InnoDB 数据文件目录和 InnoDB 日志目录存在。Make sure the InnoDB data file directory and the InnoDB log directory exist.

  • 确保 mysqld 有权在这些目录中创建文件。Make sure mysqld has access rights to create files in those directories.

  • 确保 mysqld 可以读取正确的 my.cnf 或 my.ini 选项文件,从而以你指定的选项启动。Make sure mysqld can read the proper my.cnf or my.ini option file, so that it starts with the options that you specified.

  • 确保磁盘未满,且未超过任何磁盘配额。Make sure the disk is not full and you are not exceeding any disk quota.

  • 确保为子目录和数据文件指定的名称不会冲突。Make sure that the names you specify for subdirectories and data files do not clash.

  • 仔细检查 innodb_data_home_dir 和 innodb_data_file_path 的语法。特别是,innodb_data_file_path 选项中的任何 MAX 值都是硬性限制,超出该限制会导致致命错误。Doublecheck the syntax of the innodb_data_home_dir and innodb_data_file_path values. In particular, any MAX value in the innodb_data_file_path option is a hard limit, and exceeding that limit causes a fatal error.