my_print_defaults: command not found

来源:互联网 发布:mac 终端更改时间date 编辑:程序博客网 时间:2024/05/16 06:04
重启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

保存退出,然后重新启动就可以


转自:http://blog.chinaunix.net/uid-27687885-id-3886562.html


0 0
原创粉丝点击