Home > other >  A strange mysql problems
A strange mysql problems

Time:09-16

System environment: ali cloud centos7. *
Mysql: 5.5


Xshell systemctl stop mysqld login server. The service can shut down the mysql systemctl start mysqld. Service can start

But in crontab add systemctl stop mysqld. Service & amp; & Mysql systemctl start mysqld. Service does not start,

See err documents submitted to the following error:

NnoDB: Unable to lock the./ibdata1, 11
the error:InnoDB: Check that you do not already have another mysqld process

View the process: ps - ef | grep mysql

Mysql, 2069, 1052, 38 Aug23,,,,,,,

See a mysql process, explain the stop when not fully closed, so don't start,

Kill 9 2069

Systemctl start mysqld. Service is successful,

Manually stop and start all no problem, once in a crontab to 11 errors, don't start,

A great god, please help analyze, where is the problem? Or provide a train of thought,

CodePudding user response:

Try to hit the crontab log out, generally don't perform because rights issue or execute the command path problem, try using an absolute path

CodePudding user response:

Crontab enforce shell need absolute path

CodePudding user response:

You need to systemctl stop mysqld. Service & amp; & Mysql systemctl start mysqld. Service this command in a shell file, and then through the absolute path to invoke it
  • Related