SQLAdvisor:MySQL SQL优化工具
SQLAdvisor是由美团点评公司技术工程部DBA团队(北京)开发维护的一个分析SQL给出索引优化建议的工具。它基于MySQL原生态词法解析,结合分析SQL中的where条件、聚合条件、多表Join关系 给出索引优化建议。目前SQLAdvisor在美团点评内部广泛应用,公司内部对SQLAdvisor的开发全面转到github上,开源和内部使用保持一致。 SQLAdvisor项目地址 https:
Read moreSQLAdvisor是由美团点评公司技术工程部DBA团队(北京)开发维护的一个分析SQL给出索引优化建议的工具。它基于MySQL原生态词法解析,结合分析SQL中的where条件、聚合条件、多表Join关系 给出索引优化建议。目前SQLAdvisor在美团点评内部广泛应用,公司内部对SQLAdvisor的开发全面转到github上,开源和内部使用保持一致。 SQLAdvisor项目地址 https:
Read more应审计需要,需将MySQL数据恢复到14天前。 公司MySQL采用xtrabackup方式备份。使用xtrabackup恢复MySQL后,无法启动MySQL,报错如下
1 |
Starting MySQL....The server quit without updating PID file[失败]a/mysql/data/SL010A-IVAMD1.pid). |
查看MySQL错误日志
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
2017-03-15 09:08:01 23485 [Note] InnoDB: Memory barrier is not used 2017-03-15 09:08:01 23485 [Note] InnoDB: Compressed tables use zlib 1.2.3 2017-03-15 09:08:01 23485 [Note] InnoDB: Using Linux native AIO 2017-03-15 09:08:01 23485 [Note] InnoDB: Using CPU crc32 instructions 2017-03-15 09:08:01 23485 [Note] InnoDB: Initializing buffer pool, size = 6.0G 2017-03-15 09:08:01 23485 [Note] InnoDB: Completed initialization of buffer pool 2017-03-15 09:08:01 23485 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode 2017-03-15 09:08:01 23485 [ERROR] InnoDB: The system tablespace must be writable! 2017-03-15 09:08:01 23485 [ERROR] Plugin 'InnoDB' init function returned error. 2017-03-15 09:08:01 23485 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. ^G/data/mysql/bin/mysqld: File '/mysql/log/slow.log' not found (Errcode: 2 - No such file or directory) 2017-03-15 09:08:01 23485 [ERROR] Could not open /mysql/log/slow.log for logging (error 2). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown t he MySQL server and restart it. 2017-03-15 09:08:01 23485 [ERROR] Unknown/unsupported storage engine: InnoDB 2017-03-15 09:08:01 23485 [ERROR] Aborting |
解决办法: 由于执行xtrabackup使用root用户,恢复
Read more