重启mysql服务报如下错误mysql版本5.5.8:
# /etc/init.d/mysqld restart
/etc/init.d/mysqld: line 256: my_print_defaults: command not found
/etc/init.d/mysqld: line 256: my_print_defaults: command not found
MySQL server PID file could not be found! [FAILED]
/etc/init.d/mysqld: line 256: my_print_defaults: command not found
Starting MySQLCouldn't find MySQL server (./bin/mysqld_safe[FAILED]
解决办法:
编辑/etc/my.cnf 文件,因为缺少basedir 和 datadir 两个路径,在 [mysqld] 添加上即可
#vim /etc/my.cnf
[mysqld]
...........
...........
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
保存退出,然后重新启动就可以
阅读(14149) | 评论(0) | 转发(0) |