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

mysqld_multi启动报错求助:硬盘故障执行fsck后遇启动问题

Fixing mysqld_multi's "ledir=..." Warning Post-fsck

Hey Marco, sorry to hear you’ve been stuck troubleshooting this mysqld_multi issue for two days—dealing with a hard drive failure followed by fsck is already stressful enough. Let’s get this sorted out.

Why You’re Seeing This Warning

The error about ledir=... means mysqld_safe can’t locate the actual mysqld binary executable anymore. This is almost certainly a side effect of your fsck operation: it might have altered file permissions, broken symbolic links, or even shifted the path to your MySQL binaries without you noticing.

Step-by-Step Fix

  • Find the real path to your mysqld binary
    Run either of these commands in your terminal to locate where mysqld is installed:

    which mysqld
    # Or if that doesn't work (e.g., if mysqld isn't in your PATH):
    find / -name mysqld -type f
    

    You’ll get an output like /usr/sbin/mysqld or /usr/local/mysql/bin/mysqld—make sure to note the directory part (e.g., /usr/sbin or /usr/local/mysql/bin, not the full path to the binary itself).

  • Update your my.cnf configuration
    Open your my.cnf file in a text editor (e.g., nano /etc/my.cnf or vim /etc/mysql/my.cnf), then find each [mysqldN] group (where N is your instance number, like [mysqld1], [mysqld2]). Add the ledir parameter to each of these groups, pointing to the directory you found in the previous step:

    [mysqld1]
    ledir=/usr/sbin
    # ... your other existing config parameters (datadir, port, etc.) ...
    
    [mysqld2]
    ledir=/usr/sbin
    # ... your other existing config parameters ...
    
  • Restart mysqld_multi and verify
    Stop and restart your MySQL instances to apply the change:

    mysqld_multi stop
    mysqld_multi --verbose start
    

    Check if the warning is gone, and confirm all instances are running as expected with mysqld_multi report.

Extra Troubleshooting Tips

  • Double-check permissions on the mysqld binary: Ensure the mysql user has execute access with ls -l /path/to/mysqld.
  • If you compiled MySQL from source, confirm the installation directory wasn’t moved or corrupted during fsck.
  • Verify other path-related parameters in my.cnf (like datadir) are still pointing to valid, accessible directories—fsck might have affected those too.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.25 07:25:10