mysql集群无法启动成功
场景:两台数据库运行一段时间后发现集群挂了,一台服务正常,一台不正常。
日志如下:
[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集群无法启动成功的更多相关文章
- docker PXC MYSQL集群节点启动失败/节点顺序消失/只剩一个节点存在问题的解决
转载于:https://my.oschina.net/u/4884318/blog/4908669 大牛 佩服此人 截取本人遇到的问题: "error:0407008A:rsa routin ...
- 搭建MySQL集群-注意版本
系统环境采样(来自其他机器,直接copy过来的,在安装的机器上,按照步骤查看即可,当然这些还不够实际,后续补充) 检查系统内是否有其他mysql rpm -qa | grep mysql 是否存在my ...
- 容器化|自建 MySQL 集群迁移到 Kubernetes
背景 如果你有自建的 MySQL 集群,并且已经感受到了云原生的春风拂面,想将数据迁移到 Kubernetes 上,那么这篇文章可以给你一些思路. 文中将自建 MySQL 集群数据,在线迁移到 Kub ...
- 项目进阶 之 集群环境搭建(三)多管理节点MySQL集群
上次的博文项目进阶 之 集群环境搭建(二)MySQL集群中,我们搭建了一个基础的MySQL集群,这篇博客咱们继续讲解MySQL集群的相关内容,同时针对上一篇遗留的问题提出一个解决方案. 1.单管理节点 ...
- 京东分布式MySQL集群方案介绍
背景 数据库作为一个非常基础的系统,任何一家互联网公司都会使用,数据库产品也很多,有Oracle.SQL Server .MySQL.PostgeSQL.MariaDB等,像SQLServer/Ora ...
- mysql集群实例
原文地址:http://www.it165.net/database/html/201403/5678.html http://www.cnblogs.com/seesea125/archive/20 ...
- MySQL Cluster(MySQL 集群) 初试(转)
作/译者:叶金荣(imysql#imysql.com>),来源:http://imysql.com,欢迎转载. 作/译者:叶金荣(Email: ),来源:http://imysql.cn,转载请 ...
- MYSQL集群的搭建
按照此配置完全可以配置成功!! 一.介绍========测试环境:Server1:ndbd 192.168.1.225Server2:ndbd 192.168.1.226Server3:mysqld ...
- 分布式MySQL集群方案的探索与思考
转载:http://www.infoq.com/cn/articles/exploration-of-distributed-mysql-cluster-scheme?utm_campaign=rig ...
随机推荐
- CVE-2010-3333-office RTF栈溢出漏洞分析
0x00 前言 此漏洞是根据泉哥的<漏洞战争>来学习分析的,网上已有大量分析文章在此只是做一个独立的分析记录. 0x01 复现环境 操作系统-->windows7 x64 软件版本- ...
- nginx配置实例及多服务器负载
目录 nginx配置实例 多服务器负载 nginx配置实例 nginx.conf worker_processes 1; events { worker_connections 1024; } htt ...
- 如何讲一个网页转换为jpg?(图片!)
不需要安装插件!!! 打开网页,打开开发者工具 快捷键: ctrl+shift+p输入>full即可自动下载!
- Linux Nvidia显卡驱动安装
1 概述 因为某些需要需要在Linux上安装显卡驱动,这里记录一下安装过程. 2 环境 Manjaro RTX 2060 3 下载驱动安装包 到官网上搜索下载即可,可以戳这里: 选择自己的显卡型号即可 ...
- day6.细说类型2
一.字符串(一)字符串需要掌握的操作1.# strip (清除):序列是一段字符串,该函数表示从头和从尾部同时开始进行扫描,如果扫描的字符在序列字符串中,则剔除掉,一直到遇到一个不在序列字符串中的字符 ...
- ELK安装和配置及常用插件安装
环境 CentOS 7.3 root 用户 JDK 版本:1.8(最低要求),主推:JDK 1.8.0_121 以上 关闭 firewall systemctl stop firewalld.serv ...
- MSSQL数据库清理Log 压缩数据库日志文件
dump transaction 数据库名 with no_log go dbcc shrinkdatabase(数据库名)
- docker日志设置
最近查看docker日志的时候,使用命令docker log -f 会出现日志无限翻滚的情况,这些日志都是打印到控制台的,但是都被docker收集了起来,放到了/var/lib/docker/cont ...
- 【Oauth2.0】Oauth2.0
一.什么是Oauth2.0? 1.Oauth2.0即(Open Authorization ),Oauth2.0是一个用于第三方授权的开放标准,是Oauth1.0的升级版本,相比1.0版本易于使用: ...
- thinkPHP5中的与原本的字母方法用什么东西替代了?
过去的单字母函数已完全被替换掉,如下:S=>cache,C=>config,M/D=>model,U=>url,I=>input,E=>exception,L=&g ...