已经安装成功,就是启动的时候,通过mysql.server start命令去启动服务,但是5.7的版本会通过mysqld_safe去启动服务,然后mysqld_safe去找msyqld程序时,找得地方不是我安装的目录地方 ,求解 求大神
[root@JackieGu ~]# /home/mysql/mysql-5.7.17/support-files/mysql.server start
Starting MySQL.2017-02-23T08:42:55.844732Z mysqld_safe The file /usr/local/mysql/bin/mysqld
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&
See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information
The server quit without updating PID file (/home/mysql/mysq[FAILED]/data/JackieGu.pid).
[root@JackieGu ~]#
[root@JackieGu ~]# /home/mysql/mysql-5.7.17/support-files/mysql.server start
Starting MySQL.2017-02-23T08:42:55.844732Z mysqld_safe The file /usr/local/mysql/bin/mysqld
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&
See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information
The server quit without updating PID file (/home/mysql/mysq[FAILED]/data/JackieGu.pid).
[root@JackieGu ~]#
直接用服务启动
这个文件没有执行权限或者不存在。mysql_safe就是个sh脚本,你可以指定配置文件和参数给他。比如
/bin/sh /data/mysql/bin/mysqld_safe --defaults-file=/data/mysql/my.cnf &> /dev/null &
涉及路径的都在my.cnf里配置。