[root@centos7 ~]#service mysqld start
/etc/init.d/mysqld: line 239: my_print_defaults: command not found
/etc/init.d/mysqld: line 259: cd: /usr/local/mysql: No such file or directory
Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)
解决办法:
# vi /etc/my.cnf (指明basedir和datadir路径即可)
basedir=/usr/local/mysql
datadir=/data/mysql
[root@centos7 ~]#service mysqld start
Starting MySQL. SUCCESS!