Thursday 28 August 2014

my_print_defaults: command not found


[root@centos7 mysql]# service mysql status

/etc/init.d/mysql: line 256: my_print_defaults: command not found

 ERROR! MySQL is not running

[root@centos7 mysql]# find / -name my_print_defaults

/home/mysql/bin/my_print_defaults

[root@centos7 mysql]# cp /home/mysql/bin/my_print_defaults /usr/bin

[root@centos7 mysql]# service mysql status

 ERROR! MySQL is not running

[root@centos7 mysql]# service mysql restart

 ERROR! MySQL server PID file could not be found!

/etc/init.d/mysql: line 276: cd: /usr/local/mysql: No such file or directory

Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)

[root@centos7 mysql]# vi /etc/init.d/mysql

Replace those /usr/local/mysql to /home/mysql(/home/mysql is my mysql default path)

[root@centos7 mysql]# service mysql stop

Shutting down MySQL..140827 16:25:40 mysqld_safe mysqld from pid file /home/mysql/data/centos7.pid ended

 SUCCESS!

[1]+  Done                    bin/mysqld_safe --user=mysql

[root@centos7 mysql]# service mysql start

Starting MySQL.. SUCCESS!

[root@centos7 mysql]#

No comments:

Post a Comment