mysql在mysqld_safe安全模式下启动报错

爱互踩 爱互踩流量交换~

费话不说多我们来看看在我linux中的mysql在mysqld_safe安全模式下启动报错失败的原因与解决办法,有需要了解的朋友可尝试此方法来解决你的问题.

使用二进制编译文件的mysqld_safe启动报错,如下:

  1. [mysql@ECP-UC-DB1~]$mysqld_safe
  2. 11070721:31:19mysqld_safeLoggingto‘/opt/mysql/mysqldata/ECP-UC-DB1.err’.
  3. 11070721:31:19mysqld_safeThefile/usr/local/mysql/bin/mysqld
  4. doesnotexistorisnotexecutable.Pleasecdtothemysqlinstallation
  5. directoryandrestartthisscriptfromthereasfollows:
  6. ./bin/mysqld_safe&
  7. Seehttp://dev.mysql.com/doc/mysql/en/mysqld-safe.htmlformoreinformation

解决方法:

  1. su–root
  2. mkdir/usr/local/mysql/bin
  3. ln-s/opt/mysql/product/5.5/bin/mysqld/usr/local/mysql/bin/mysqld

再次执行mysqld_safe

  1. [mysql@ECP-UC-DB1~]$mysqld_safe
  2. 11070721:32:37mysqld_safeLoggingto‘/opt/mysql/mysqldata/ECP-UC-DB1.err’.--phpfensi.com
  3. 11070721:32:37mysqld_safeStartingmysqlddaemonwithdatabasesfrom/opt/mysql/mysqldata

启动结果:

  1. mysql2688523452021:32pts/000:00:00/bin/sh/opt/mysql/product/5.5/bin/mysqld_safe
  2. mysql2765326885021:32pts/000:00:00/usr/local/mysql/bin/mysqld–basedir=/opt/mysql/product/5.5–datadir=/opt/mysql/mysqldata–plugin-dir=/usr/local/mysql/lib/plugin–log-error=/opt/mysql/mysqldata/ECP-UC-DB1.err–open-files-limit=8192–pid-file=/var/run/mysqld/mysqld.pid–socket=/var/run/mysqld/mysqld.sock–port=3306

问题存在原因:

1、mysqld_safe只认识/usr/local/mysql/bin/mysqld(也许是配置问题)

2、my.cnf只能放置在/etc/下面,不然使用–defaults-file也不能读取my.cnf文件(有疑惑)

总结,不一样的问题可能会有一点区别,大家需要根据自己的经验来分析原因.

相关广告
  • mysql在mysqld_safe安全模式下启动报错 mysql在mysqld_safe安全模式下启动报错 mysql在mysqld_safe安全模式下启动报错
相关阅读

mysql在mysqld_safe安全模式下启动报错

2019/10/10 17:35:14 | 谷歌SEO算法 | 黑猫SEO