You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

MySQL频繁崩溃求助:Windows10下MySQL5.7.17报错排查

Fixing MySQL 5.7.17 Frequent Crashes on Windows 10 (InnoDB OS Errors 23 & 123)

Let’s walk through the solutions tailored to the errors you’re seeing—these are common issues with older MySQL versions on Windows, and we can resolve them step by step:

Key Error Breakdown

First, let’s decode the critical errors to understand what’s happening:

  • OS Error 23: Typically relates to file access issues (missing files, permission restrictions)
  • OS Error 123: Windows’ "invalid filename/path" error, which ties directly to the InnoDB table file (sales_entry_header.ibd) mentioned in your log
  • The "Windows aio" failure points to compatibility bugs with MySQL’s native asynchronous I/O implementation on Windows 10

Step-by-Step Solutions

1. Fix Invalid Database/Table Paths

The error flags the table path .\pink_square_wov\sales_entry_header.ibd. Windows is strict about path characters, so:

  • Check if the database name (pink_square_wov) or table name has special characters (spaces, non-English letters, symbols like & or #). These can break InnoDB’s file handling.
  • Move the database folder to a simple, ASCII-only path (e.g., C:\MySQL\Data\pink_square_wov instead of a path with spaces or non-Latin characters). Stop the MySQL service before moving files, then update the datadir setting in my.ini if needed.

2. Disable InnoDB Native AIO

MySQL 5.7’s native Windows AIO has known bugs in older releases. Disabling it forces InnoDB to use a more stable fallback I/O method:

  • Open your MySQL configuration file (my.ini—usually located in C:\ProgramData\MySQL\MySQL Server 5.7)
  • Add or modify this line under the [mysqld] section:
    innodb_use_native_aio = 0
    
  • Save the file and restart the MySQL service. This should eliminate the "Windows aio" error immediately.

3. Verify File Permissions

MySQL needs full access to its data directory to read/write table files properly:

  • Right-click your MySQL data folder → Properties → Security tab
  • Click Edit and ensure the account running MySQL (usually Local System or a dedicated service account) has Full Control permissions
  • Apply the changes and restart the service to ensure permissions take effect.

4. Repair Corrupted InnoDB Tables

Crashes can leave tables in a corrupted state. Here’s how to fix them:

  1. Stop the MySQL service
  2. Add this line to my.ini under [mysqld] to force recovery (start with level 1, which is non-destructive):
    innodb_force_recovery = 1
    
  3. Start MySQL and run this SQL command to repair the problematic table:
    REPAIR TABLE pink_square_wov.sales_entry_header;
    
  4. Once repaired, remove the innodb_force_recovery line from my.ini and restart MySQL normally.

MySQL 5.7.17 is quite outdated (released in 2017). Later 5.7.x updates (like 5.7.44) or MySQL 8.0 fix dozens of Windows-specific stability bugs, including InnoDB AIO issues. Upgrading is the most long-term solution to prevent future crashes.


内容的提问来源于stack exchange,提问作者Sariful

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 09:01:24