mysql - LAMPP MySQL Ubuntu 未运行
问题描述
重新启动 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
我该如何解决这个问题?
解决方案
这意味着 mysqld 上次没有正确关闭,并且在崩溃后手动删除了关键恢复信息(最后一个 binlog 或 tc.log 文件)。您必须使用--tc-heuristic-recover
switch 启动 mysqld 以提交或回滚待处理的事务
推荐阅读
- javascript - 如何在没有外部模块的情况下使用 node.js 将授权标头添加到获取请求
- protocol-buffers - gRPC-Gateway 转码中的自定义 URL 参数
- html - Firefox 密码下拉悬停事件使悬停离开菜单
- clickhouse - clickhouse中插入查询中的正则表达式
- javascript - 为什么console.logging在函数外按预期工作,但在一个函数内这样做会将我的值标记为未定义?
- android - Android 11 IjkMediaPlayer 和 GiraffePlayer2 问题
- mysql - cmake:“cxx11”不是公认的标准
- memory-management - Segmentation VS Paging 性能差异及在OS中的应用
- qt - 如何向 Qml 立方体实体添加 6 个自定义纹理?
- python - Pyinstaller 窗口化 Tkinter exe 无法打开 adobe