报错信息:
在使用 root 用户直接运行 #mysqld_safe
mysql无法启动报错如下
2018-03-02 16:29:06 27644 [Note]
180302 16:29:06 mysqld_safe mysqld from pid file /monitor/mysql/data/service2.pid ended
2018-03-02 16:29:03 27644 [ERROR] Can't find messagefile '/monitor/mysql/share/mysql/errmsg.sys'
后来记起来这套环境是使用 mysql 2进制文件(mysql-5.6.31-linux-glibc2.5-x86_64.tar.gz)直接安装的
直接在任意目录下运行mysqld_safe ,可能导致运行mysqld的环境变量异常
[root@service2 mysql]# which mysqld_safe
/usr/bin/mysqld_safe
[root@service2 mysql]# locate mysqld_safe
/monitor/mysql/bin/mysqld_safe --------这才是我真正的mysql 的base_dir
/monitor/mysql/man/man1/mysqld_safe.1
/usr/bin/mysqld_safe
/usr/share/man/man1/mysqld_safe.1.gz