mysqld를 시작할 수 없습니다

mysqld를 시작할 수 없습니다

mysql을 시작하려고 시도한 후 다음 메시지를 받았습니다.

$ sudo systemctl start mysqld
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
[pi@raspi ~]$ systemctl status mysqld
* mariadb.service - MariaDB 10.5.5 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Sun 2020-08-23 08:34:44 PDT; 9s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 466 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 467 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/S>
    Process: 479 ExecStart=/usr/bin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
   Main PID: 479 (code=exited, status=1/FAILURE)
     Status: "MariaDB server is down"

Aug 23 08:34:44 raspi mariadbd[479]: 2020-08-23  8:34:44 0 [ERROR] InnoDB: Upgrade after a crash is not supported. The redo log was created with MariaDB 10.4.14.
Aug 23 08:34:44 raspi mariadbd[479]: 2020-08-23  8:34:44 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
Aug 23 08:34:44 raspi mariadbd[479]: 2020-08-23  8:34:44 0 [Note] InnoDB: Starting shutdown...
Aug 23 08:34:44 raspi mariadbd[479]: 2020-08-23  8:34:44 0 [ERROR] Plugin 'InnoDB' init function returned error.
Aug 23 08:34:44 raspi mariadbd[479]: 2020-08-23  8:34:44 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Aug 23 08:34:44 raspi mariadbd[479]: 2020-08-23  8:34:44 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Aug 23 08:34:44 raspi mariadbd[479]: 2020-08-23  8:34:44 0 [ERROR] Aborting
Aug 23 08:34:44 raspi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Aug 23 08:34:44 raspi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Aug 23 08:34:44 raspi systemd[1]: Failed to start MariaDB 10.5.5 database server.
lines 1-21/21 (END)

syslog-ng저도 정보 가 안보이네요 /var/log/messages.log...

무슨 일이 일어나고 있는지 잘 모르겠습니다. 누구든지 이 문제를 해결하도록 도와줄 수 있나요? :영형

@tetech가 제안한 대로 이전 버전의 mariadb 패키지로 다운그레이드해야 합니다. 그래서 나는 다음을 시도한다:

[pi@raspi pkg]$ sudo pacman -U /var/cache/pacman/pkg/mariadb-10.4.14-1-aarch64.pkg.tar.xz 
[sudo] password for pi: 
loading packages...
warning: downgrading package mariadb (10.5.5-1 => 10.4.14-1)
resolving dependencies...
warning: cannot resolve "mariadb-clients=10.4.14", a dependency of "mariadb"
:: The following package cannot be upgraded due to unresolvable dependencies:
      mariadb

:: Do you want to skip the above package for this upgrade? [y/N] n
error: failed to prepare transaction (could not satisfy dependencies)
:: unable to satisfy dependency 'mariadb-clients=10.4.14' required by mariadb
[pi@raspi pkg]$ sudo pacman -U /var/cache/pacman/pkg/mariadb-clients-10.4.14-1-aarch64.pkg.tar.xz 
loading packages...
warning: downgrading package mariadb-clients (10.5.5-1 => 10.4.14-1)
resolving dependencies...
warning: cannot resolve "mariadb-libs=10.4.14", a dependency of "mariadb-clients"
:: The following package cannot be upgraded due to unresolvable dependencies:
      mariadb-clients

:: Do you want to skip the above package for this upgrade? [y/N] 
error: failed to prepare transaction (could not satisfy dependencies)
:: unable to satisfy dependency 'mariadb-libs=10.4.14' required by mariadb-clients
[pi@raspi pkg]$ sudo pacman -U /var/cache/pacman/pkg/mariadb-libs-10.4.14-1-aarch64.pkg.tar.xz    
loading packages...
warning: downgrading package mariadb-libs (10.5.5-1 => 10.4.14-1)
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing mariadb-libs (10.4.14-1) breaks dependency 'mariadb-libs=10.5.5' required by mariadb-clients
[pi@raspi pkg]$ sudo pacman -U /var/cache/pacman/pkg/mariadb-clients-10.4.14-1-aarch64.pkg.tar.xz 
loading packages...
warning: downgrading package mariadb-clients (10.5.5-1 => 10.4.14-1)
resolving dependencies...
warning: cannot resolve "mariadb-libs=10.4.14", a dependency of "mariadb-clients"
:: The following package cannot be upgraded due to unresolvable dependencies:
      mariadb-clients

:: Do you want to skip the above package for this upgrade? [y/N] 
error: failed to prepare transaction (could not satisfy dependencies)
:: unable to satisfy dependency 'mariadb-libs=10.4.14' required by mariadb-clients

그러나 그것은 mariadb-libs불평하는 것 같고 mariadb-clients그 반대도 마찬가지입니다. 어떻게 다운그레이드하나요? 이제 데이터베이스를 다시 초기화하는 것이 더 쉬울 수도 있다고 생각하고 있습니다.

답변1

주목할만한 오류는InnoDB: Upgrade after a crash is not supported. The redo log was created with MariaDB 10.4.14.

데이터베이스를 제대로 중지한 후 업그레이드하지 않으신 것 같습니다.

10.4.14로 다운그레이드하고 업그레이드하기 전에 수행한 백업을 복원하거나 다시 초기화하여 복원해야 합니다.

답변2

Manjaro Linux의 내 솔루션은 sudo pacman -s downgrade다음 과 같습니다.

downgrade mariadb-libs mariadb-clients mariadb

다운그레이드를 사용하면 다운그레이드하려는 버전을 선택할 수도 있습니다. 매우 간단하고 매력적입니다.

답변3

mysql 서버를 다운그레이드하는 방법은 다음과 같습니다.

$ sudo pacman -U /var/cache/pacman/pkg/mariadb-clients-10.4.14-1-aarch64.pkg.tar.xz /var/cache/pacman/pkg/mariadb-libs-10.4.14-1-aarch64.pkg.tar.xz /var/cache/pacman/pkg/mariadb-10.4.14-1-aarch64.pkg.tar.xz

그 후 MySql 서버를 다시 정상적으로 시작할 수 있게 되었는데, 이제 제대로 업그레이드하는 방법을 살펴봐야 합니다.

관련 정보