mysqld_multi启动报错求助:硬盘故障执行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 fYou’ll get an output like
/usr/sbin/mysqldor/usr/local/mysql/bin/mysqld—make sure to note the directory part (e.g.,/usr/sbinor/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.cnforvim /etc/mysql/my.cnf), then find each[mysqldN]group (where N is your instance number, like[mysqld1],[mysqld2]). Add theledirparameter 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 startCheck 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
mysqluser has execute access withls -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

