Py学习  »  DATABASE

lampp mysql ubuntu未运行

H Dindi • 4 年前 • 312 次点击  

重新启动MySQL服务器时出现问题:

通过以下方式:

/opt/lampp/var/mysql$ sudo /opt/lampp/lampp start
Starting XAMPP for Linux 5.6.36-0...
XAMPP: Starting Apache...already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...already running.
After sometime it fails to the following :

/opt/lampp/var/mysql$ sudo /opt/lampp/lampp status
Version: XAMPP for Linux 5.6.36-0
Apache is running.
MySQL is not running.
ProFTPD is running.

当我检查bin错误日志时,我得到以下错误=>

2018-10-11 10:00:41 140280246654784 [ERROR] InnoDB: Failed to find tablespace for table '"t4a"."tbl_responses"' in the cache. Attempting to load the tablespace with space id 2845.
InnoDB: 2 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 0 row operations to undo
InnoDB: Trx id counter is 3472600576
2018-10-11 10:00:41 140280246654784 [Note] InnoDB: 128 rollback segment(s) are active.
2018-10-11 10:00:41 140277711759104 [Note] InnoDB: Starting in background the rollback of recovered transactions
2018-10-11 10:00:41 140277711759104 [Note] InnoDB: Rollback of non-prepared transactions completed
2018-10-11 10:00:41 140280246654784 [Note] InnoDB: Waiting for purge to start
2018-10-11 10:00:41 140280246654784 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.38-83.0 started; log sequence number 342276173866
2018-10-11 10:00:41 140277623092992 [Note] InnoDB: Dumping buffer pool(s) not yet started
2018-10-11 10:00:41 140280246654784 [Note] Plugin 'FEEDBACK' is disabled.
2018-10-11 10:00:41 7f958a455740  InnoDB: Starting recovery for XA transactions...
2018-10-11 10:00:41 7f958a455740  InnoDB: Transaction 3472595085 in prepared state after recovery
2018-10-11 10:00:41 7f958a455740  InnoDB: Transaction contains changes to 1 rows
2018-10-11 10:00:41 7f958a455740  InnoDB: Transaction 3472595084 in prepared state after recovery
2018-10-11 10:00:41 7f958a455740  InnoDB: Transaction contains changes to 1 rows
2018-10-11 10:00:41 7f958a455740  InnoDB: 2 transactions in prepared state after recovery
2018-10-11 10:00:41 140280246654784 [Note] Found 2 prepared transaction(s) in InnoDB
2018-10-11 10:00:41 140280246654784 [ERROR] Found 2 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.
2018-10-11 10:00:41 140280246654784 [ERROR] Aborting

如何解决此问题?

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/38195
 
312 次点击  
文章 [ 1 ]  |  最新文章 4 年前
Philip Couling
Reply   •   1 楼
Philip Couling    5 年前

这意味着mysqld上次没有正确关闭,崩溃后手动删除了关键恢复信息(last binlog或tc.log文件)。你必须从mysqld开始 --tc-heuristic-recover 切换到提交或回滚挂起的事务