LINUX.ORG.RU
ФорумAdmin

Не стартует MySQL/MariaDB в CentOS7

 , ,


0

1

Не стартует MariaDB после отключения/включения света.

[root@localhost ~]# systemctl status mysql
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Tue 2018-02-13 12:26:48 MSK; 15min ago
Process: 25834 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 25972 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 25960 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 25958 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 25972 (code=exited, status=1/FAILURE)


Feb 13 12:26:48 localhost.localdomain mysqld[25972]: 2018-02-13 12:26:48 140614920276160 [Note] InnoDB: Doing recovery: scanned up to log sequence number 7173560832
Feb 13 12:26:48 localhost.localdomain mysqld[25972]: 2018-02-13 12:26:48 140614920276160 [Note] InnoDB: Doing recovery: scanned up to log sequence number 7178803712
Feb 13 12:26:48 localhost.localdomain mysqld[25972]: 2018-02-13 12:26:48 140614920276160 [Note] InnoDB: Doing recovery: scanned up to log sequence number 7178931111
Feb 13 12:26:48 localhost.localdomain mysqld[25972]: 2018-02-13 12:26:48 140614920276160 [Note] InnoDB: Database was not shutdown normally!
Feb 13 12:26:48 localhost.localdomain mysqld[25972]: 2018-02-13 12:26:48 140614920276160 [Note] InnoDB: Starting crash recovery.
Feb 13 12:26:48 localhost.localdomain mysqld[25972]: 2018-02-13 12:26:48 140614920276160 [Note] InnoDB: Recovered page [page id: space=0, page number=0] from the doublewrite buffer.
Feb 13 12:26:48 localhost.localdomain systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Feb 13 12:26:48 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
Feb 13 12:26:48 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
Feb 13 12:26:48 localhost.localdomain systemd[1]: mariadb.service failed.


[root@localhost ~]# journalctl -f -u mariadb.service
-- Logs begin at Mon 2018-02-12 10:57:29 MSK. --
Feb 13 12:26:48 localhost.localdomain mysqld[25972]: 2018-02-13 12:26:48 140614920276160 [Note] InnoDB: Doing recovery: scanned up to log sequence number 7173560832
Feb 13 12:26:48 localhost.localdomain mysqld[25972]: 2018-02-13 12:26:48 140614920276160 [Note] InnoDB: Doing recovery: scanned up to log sequence number 7178803712
Feb 13 12:26:48 localhost.localdomain mysqld[25972]: 2018-02-13 12:26:48 140614920276160 [Note] InnoDB: Doing recovery: scanned up to log sequence number 7178931111
Feb 13 12:26:48 localhost.localdomain mysqld[25972]: 2018-02-13 12:26:48 140614920276160 [Note] InnoDB: Database was not shutdown normally!
Feb 13 12:26:48 localhost.localdomain mysqld[25972]: 2018-02-13 12:26:48 140614920276160 [Note] InnoDB: Starting crash recovery.
Feb 13 12:26:48 localhost.localdomain mysqld[25972]: 2018-02-13 12:26:48 140614920276160 [Note] InnoDB: Recovered page [page id: space=0, page number=0] from the doublewrite buffer.
Feb 13 12:26:48 localhost.localdomain systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Feb 13 12:26:48 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
Feb 13 12:26:48 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
Feb 13 12:26:48 localhost.localdomain systemd[1]: mariadb.service failed.



Последнее исправление: fumufu86 (всего исправлений: 4)

Повредился файл базы данных, по логу восстановление не сработало. Можно или достать БД из бекапа, или погуглить еще советы по восстановлению базы, предварительно забекапив файлы.

goingUp ★★★★★
()

Посмотрите в /var/lib/mysql/*err — там будут указаны поврежденные таблицы

int13h ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.