场景:两台数据库运行一段时间后发现集群挂了,一台服务正常,一台不正常。

日志如下:

 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/innodb_table_stats uses space ID: 1 at filepath: ./mysql/innodb_table_stats.ibd. Cannot open tablespace testdb/dr_actions which uses space ID: 1 at filepath: ./testdb/dr_actions.ibd
2013-11-18 21:25:25 a171e1a8 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
InnoDB: Error: could not open single-table tablespace file ./testdb/dr_actions.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot
InnoDB: open the file, you should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.

解决方法:

编辑/etc/my.cnf,添加

[mysqld]
innodb_force_recovery=1

重启数据库服务

启动成功后,在去掉该条记录,再次重启数据库服务,即可。

可参看:http://www.softaculous.com/board/index.php?tid=4700&title=MySQL_not_starting

那是第一种情况,还有一种情况是两端的数据不一致,导致无法启动成功。

mysql集群无法启动成功的更多相关文章

  1. docker PXC MYSQL集群节点启动失败/节点顺序消失/只剩一个节点存在问题的解决

    转载于:https://my.oschina.net/u/4884318/blog/4908669 大牛 佩服此人 截取本人遇到的问题: "error:0407008A:rsa routin ...

  2. 搭建MySQL集群-注意版本

    系统环境采样(来自其他机器,直接copy过来的,在安装的机器上,按照步骤查看即可,当然这些还不够实际,后续补充) 检查系统内是否有其他mysql rpm -qa | grep mysql 是否存在my ...

  3. 容器化|自建 MySQL 集群迁移到 Kubernetes

    背景 如果你有自建的 MySQL 集群,并且已经感受到了云原生的春风拂面,想将数据迁移到 Kubernetes 上,那么这篇文章可以给你一些思路. 文中将自建 MySQL 集群数据,在线迁移到 Kub ...

  4. 项目进阶 之 集群环境搭建(三)多管理节点MySQL集群

    上次的博文项目进阶 之 集群环境搭建(二)MySQL集群中,我们搭建了一个基础的MySQL集群,这篇博客咱们继续讲解MySQL集群的相关内容,同时针对上一篇遗留的问题提出一个解决方案. 1.单管理节点 ...

  5. 京东分布式MySQL集群方案介绍

    背景 数据库作为一个非常基础的系统,任何一家互联网公司都会使用,数据库产品也很多,有Oracle.SQL Server .MySQL.PostgeSQL.MariaDB等,像SQLServer/Ora ...

  6. mysql集群实例

    原文地址:http://www.it165.net/database/html/201403/5678.html http://www.cnblogs.com/seesea125/archive/20 ...

  7. MySQL Cluster(MySQL 集群) 初试(转)

    作/译者:叶金荣(imysql#imysql.com>),来源:http://imysql.com,欢迎转载. 作/译者:叶金荣(Email: ),来源:http://imysql.cn,转载请 ...

  8. MYSQL集群的搭建

    按照此配置完全可以配置成功!! 一.介绍========测试环境:Server1:ndbd 192.168.1.225Server2:ndbd 192.168.1.226Server3:mysqld ...

  9. 分布式MySQL集群方案的探索与思考

    转载:http://www.infoq.com/cn/articles/exploration-of-distributed-mysql-cluster-scheme?utm_campaign=rig ...

随机推荐

  1. Python函数参数和注解是什么

    四种参数 Python函数func定义如下: def func(first, *args, second="Hello World", **kwargs): print(first ...

  2. Python简单实现杨辉三角

    n=input("请输入要打印的行数")n=int(n)for x in range(0,n+1): p=1 print(''.rjust(n-x),end="" ...

  3. OO_Unit2_Summary

    经过三周的自己电梯瞎设计,下次坐电梯想我想的可能就不是如何优化调度算法,而是千万别把自己死锁在电梯里了(手动狗头) 一.设计策略 1. 需求分析: 作业一:单部多线程可稍带电梯,一部电梯,固定楼层,不 ...

  4. 一般实现分布式锁都有哪些方式?使用redis如何设计分布式锁?使用zk来设计分布式锁可以吗?这两种分布式锁的实现方式哪种效率比较高?

    #(1)redis分布式锁 官方叫做RedLock算法,是redis官方支持的分布式锁算法. 这个分布式锁有3个重要的考量点,互斥(只能有一个客户端获取锁),不能死锁,容错(大部分redis节点创建了 ...

  5. 《鸟哥的Linux私房菜》部分章节学习笔记整理

    简介 此笔记为<鸟哥的Linux私房菜·基础学习篇>中部分章节的学习笔记. 目录 0 计算机概论 1 Linux是什么与如何学习 2 主机规划与磁盘分区 3 安装CentOS7.x 4 首 ...

  6. 使用Font Awesome替换EasyUI的图标

    用过EasyUI的朋友都知道,大部分组件都有一个iconCls属性,用于显示一个图标.但是EasyUI自带图标数量少.不美观,于是想到了使用Font Awesome来更换和拓展这些图标. 先看看Eas ...

  7. 动态扩展磁盘(LVM)

    使用gtp格式磁盘为lvm类型 [root@elk-log-srv01 ~]# parted /dev/vdd GNU Parted 3.1 Using /dev/vdd Welcome to GNU ...

  8. 算法tip:栈的可生成性问题

    算法tip:栈的可生成性问题 问题描述 给定 pushed 和 popped 两个序列,每个序列中的 值都不重复,判断它们是否可以在最初空栈上进行推入 push 和弹出 pop 操作.(LeetCod ...

  9. 1053 Path of Equal Weight

    Given a non-empty tree with root R, and with weight W​i​​ assigned to each tree node T​i​​. The weig ...

  10. 元素居中的两种方法,transform和margin

    1.transform :translate(-50%,-50%) <!DOCTYPE html> <html lang="en"> <head> ...