After using xtrabackup be full amount of data recovery, start the database error

Xtrabackup the database using the whole amount after recovery, manually start the database error.
[@ slyl the root-dev-DB ~] # Start-Service mysqld
Redirecting to / bin / systemctl Start mysqld.service
the Job Control for Process The mysqld.service failed Because the Exited with error code. See "systemctl mysqld.service Status" and "journalctl -xe "for details.

View the existing system does not start mysql process
[root @ slyl-dev-db ~] # PS -ef | grep mysql
root 26673 25056 0 22:12 PTS / 0 = Auto --color 00:00:00 grep mysql

在mysql/logs目录下打开error.log文件,查看报错详情:
2020-03-18T11:14:13.333632Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-03-18T11:14:13.391230Z 0 [ERROR] InnoDB: /data/mysql/mysql_3306/logs/ib_logfile0 can't be opened in read-write mode.
2020-03-18T11:14:13.391284Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-03-18T11:14:13.991989Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-03-18T11:14:13.992018Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-03-18T11:14:13.992028Z 0 [ERROR] Failed to initialize builtin plugins.
2020-03-18T11:14:13.992035Z 0 [ERROR] Aborting

2020-03-18T11:14:13.992049Z 0 [Note] Binlog end
2020-03-18T11:14:13.992722Z 0 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

The first mistake is to not read and write access to the file ib_logfile.

View ib_logfile permissions for root
[root @ slyl-dev-db logs] # LL
total amount of 3145744
-rw-r ----- 1 MySQL MySQL error.log 22:19 12700 3 Yue 18
-rw-r ---- - 1 root root 1073741824 ib_logfile0 19:04, March 18
-rw the root. 1-R & lt ----- the root ib_logfile1 19:04 1073741824 March 18
-rw the root the root. 1-R & lt ----- March 18 1073741824 19: 05 ib_logfile2

Solution:

After deleting ib_logfile file, start mysql again.

[root@slyl-dev-db mysql_3306]# systemctl start mysqld
[root@slyl-dev-db mysql_3306]# ps -ef | grep mysql
mysql 30568 1 0 22:25 ? 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/data/mysql/mysql_3306/data --pid-file=/data/mysql/mysql_3306/tmp/mysql.pid
mysql 32007 30568 15 22:25 ? 00:00:05 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/data/mysql/mysql_3306/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=/data/mysql/mysql_3306/logs/error.log --open-files-limit=65535 --pid-file=/data/mysql/mysql_3306/tmp/mysql.pid --socket=/data/mysql/mysql_3306/tmp/mysql.sock --port=3306
root 32142 25056 0 22:26 pts/0 00:00:00 grep --color=auto mysql

Guess you like

Origin blog.51cto.com/jxplpp/2480221