mysql数据库启动失败

1、原因
公司服务器故障,非正常停机导致数据库启动失败。
报错信息
[[email protected] dmp]# /etc/init.d/mysqld start
Starting MySQL. ERROR! The server quit without updating PID file (/opt/mysql/data/15-144.pid).

2、查看mysql 日志
180625 16:08:17 mysqld_safe Starting mysqld daemon with databases from /opt/mysql/data
2018-06-25 16:08:18 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-06-25 16:08:18 0 [Note] /opt/mysql/bin/mysqld (mysqld 5.6.33) starting as process 22431 ...
2018-06-25 16:08:18 22431 [Note] Plugin ‘FEDERATED‘ is disabled.
2018-06-25 16:08:18 22431 [Note] InnoDB: Using atomics to ref count buffer pool pages
2018-06-25 16:08:18 22431 [Note] InnoDB: The InnoDB memory heap is disabled
2018-06-25 16:08:18 22431 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-06-25 16:08:18 22431 [Note] InnoDB: Memory barrier is not used
2018-06-25 16:08:18 22431 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-06-25 16:08:18 22431 [Note] InnoDB: Using Linux native AIO
2018-06-25 16:08:18 22431 [Note] InnoDB: Using CPU crc32 instructions
2018-06-25 16:08:18 22431 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-06-25 16:08:18 22431 [Note] InnoDB: Completed initialization of buffer pool
2018-06-25 16:08:18 22431 [Note] InnoDB: Highest supported file format is Barracuda.
2018-06-25 16:08:18 22431 [Note] InnoDB: Log scan progressed past the checkpoint lsn 281721748253
2018-06-25 16:08:18 22431 [Note] InnoDB: Database was not shutdown normally!
2018-06-25 16:08:18 22431 [Note] InnoDB: Starting crash recovery.
2018-06-25 16:08:18 22431 [Note] InnoDB: Reading tablespace information from the .ibd files...
2018-06-25 16:08:18 22431 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace zabbix/items_applications uses space ID: 994 at filepath: ./zabbix/items_applications.ibd. Cannot open tablespace dmp/app_model_reuse which uses space ID: 994 at filepath: ./dmp/app_model_reuse.ibd
2018-06-25 16:08:18 7fc2adb7f740 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 ./dmp/app_model_reuse.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.
180625 16:08:18 mysqld_safe mysqld from pid file /opt/mysql/data/15-144.pid ended

3、解决方案
添加配置/etc/my.cnf
innodb_force_recovery =1
文件解决

原文地址:http://blog.51cto.com/13833333/2132541

时间: 2024-10-11 20:35:54

mysql数据库启动失败的相关文章

db_recovery_file_dest_size 满导致数据库启动失败

启动数据库时: [email protected]>startup ORACLE instance started. Total System Global Area 417546240 bytes Fixed Size 2213936 bytes Variable Size 327157712 bytes Database Buffers 83886080 bytes Redo Buffers 4288512 bytes Database mounted. ORA-03113: end-of-

SPFILE导致数据库启动失败

服务器断电重启后,报数据库服务无法启动,在服务器上使用AS SYSDBA 登录后连接到空实例, 使用startup启动时报'ORA-24324: 未初始化服务句柄,ORA-01041: 内部错误, hostdef 扩展名不存在'错误. 分步启动startup nomount ,依然报以上错误,判断为spfile文件损坏造成.但本机没有使用pfile备份过spfile,而修改spfile要启动修改. 解决办法,手工创建pfile 文件INITSID.ORA,打开alert日志,找到数据库启动信息,

阿里云CentOS 7.2 MySQL服务启动失败的解决思路

阿里云 CentOS 7.2 MySQL服务启动失败的解决思路 前言 : 昨天刚刚搭建好的MySQL让老大看了一下,经过测试已经完成任务.但是今天早晨来的时候发现服务器被关了,此时我的心情崩溃的,但是我非常冷静的解决了MySQL问题.如下: 启动MySQL服务器失败,如下所示: [[email protected] ~]# /etc/init.d/mysqld start Starting mysqld (via systemctl):  Job for mysqld.service faile

CentOS下,mysql服务启动失败

mysql服务启动失败,可以使用排除法查找原因: 如果修改了my.cnf后重启mysql服务失败,大多数情况下都是配置文件有错误, 可以通过备份原来的配置文件,然后将配置文件清空,只剩下[mysqld], 使用命令systemctl restart mysqld,如果能成功重启,说明配置文件出问题了, 修改配置文件即可. 如果以上做了之后还是不能重启,这是需要去查看mysql的log文件继续进行问题排查. 原文地址:https://www.cnblogs.com/ryanzheng/p/8496

ORA-03113: end-of-file on communication channel 磁盘慢,数据库启动失败

磁盘慢,数据库启动失败:解决思路:1.让数据文件offline: 2.删除表空间 SQL> startup pfile='/server/oracle/admin/test/pfile/inittest.ora' ORACLE instance started. Total System Global Area 776646656 bytes Fixed Size 2217384 bytes Variable Size 583010904 bytes Database Buffers 18874

CentOS 7下MySQL服务启动失败的解决思路

今天,启动MySQL服务器失败,如下所示: [[email protected] ~]# /etc/init.d/mysqld start Starting mysqld (via systemctl): Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -

一台MySQL数据库启动多个实例

1.编译安装MySQL5.5 # yum install -y cmake gcc gcc-c++ make cmake ncurses ncurses-devel # groupadd mysql # useradd -g mysql -s /sbin/nologin mysql # tar zxvf mysql-5.5.31.tar.gz # cd mysql-5.5.31# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5.5-DSYSCONFD

多实例MySQL数据库启动问题

环境: 操作系统:CentOS release 6.5数据库1:版本:mysql5.6.37 basedir:/usr/local/mysql5637 配置文件位置:/data/mysql5637/my.cnf数据库2:版本:mysql5.7.19basedir:/usr/local/mysql5719配置文件位置:/data/mysql5719/my.cnf 问题摘要 今天把5.7.19的数据库给shutdown了,然后使用mysqld_safe --defaults-file=/data/m

MySQL数据库启动报错的处理

今天在linux中启动mysql时提示mysql Starting MySQL..The server quit without updating PID file了,下面我来给大家介绍解决办法. 从网上找了一堆方法如下: 1.可能是/usr/local/mysql/data/rekfan.pid文件没有写的权限解决方法 :给予权限,执行 "chown -R mysql:mysql /var/data" "chmod -R 755 /usr/local/mysql/data&