MySQL database failed to start

Source: Internet
Author: User

1. Reason
The failure of the company server and the abnormal shutdown caused the database to start failing.
Error message
[[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. View MySQL Log
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 the DEFAULT value is deprecated. --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 is 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 can be restore it from a backup,
Innodb:then you can remove the. ibd file, and InnoDB would 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, 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. Solutions
Add Configuration/etc/my.cnf
Innodb_force_recovery =1
File resolution

MySQL database failed to start

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.