首先查看Mysql的日志信息出现如下几行错误信息:
[ERROR] Found 1 prepared transactions! It means that mysqld was not shut down properly last time and critical recovery information (last binlog or tc.log file) was manually deleted after a crash. You have to start mysqld with --tc-heuristic-recover switch to commit or rollback pending transactions.
[ERROR] Aborting
第一次启动Mysql服务时添加如下参数
--tc-heuristic-recover=rollback
注意:第一次启动之后,将上述参数去掉,再次启动,则可以正常使用。