programing

MariaDB 10.3 데이터베이스 서버를 시작하지 못했습니다.

goodsources 2022. 12. 19. 21:28
반응형

MariaDB 10.3 데이터베이스 서버를 시작하지 못했습니다.

mariadb를 시작할 수 없습니다.서비스.mariadb 부팅 중 다음 오류가 발생하였습니다.서비스.

[root@localhost bggb]# systemctl start  mariadb.service
        Job for mariadb.service failed because the control process exited with error code.
        See "systemctl status mariadb.service" and "journalctl -xe" for details.

    

여기 mariadb의 현황입니다.서비스

[root@localhost bggb]# systemctl status mariadb.service
            ● mariadb.service - MariaDB 10.3 database server
               Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
               Active: failed (Result: exit-code) since Mon 2021-07-12 16:56:03 IST; 59s ago
                 Docs: man:mysqld(8)
                       https://mariadb.com/kb/en/library/systemd/
              Process: 6260 ExecStart=/usr/libexec/mysqld --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER (code=exited>
              Process: 6221 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mariadb.service (code=exited, status=0/SUCC>
              Process: 6196 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
             Main PID: 6260 (code=exited, status=1/FAILURE)
               Status: "MariaDB server is down"
            
            Jul 12 16:56:03 localhost.localdomain mysqld[6260]: 2021-07-12 16:56:03 0 [ERROR] Plugin 'Aria' init funct>
            Jul 12 16:56:03 localhost.localdomain mysqld[6260]: 2021-07-12 16:56:03 0 [ERROR] Plugin 'Aria' registrati>
            Jul 12 16:56:03 localhost.localdomain mysqld[6260]: 2021-07-12 16:56:03 0 [Note] Plugin 'FEEDBACK' is disa>
            Jul 12 16:56:03 localhost.localdomain mysqld[6260]: 2021-07-12 16:56:03 0 [ERROR] Could not open mysql.plu>
            Jul 12 16:56:03 localhost.localdomain mysqld[6260]: 2021-07-12 16:56:03 0 [ERROR] Unknown/unsupported stor>
            Jul 12 16:56:03 localhost.localdomain mysqld[6260]: 2021-07-12 16:56:03 0 [ERROR] Aborting
            Jul 12 16:56:03 localhost.localdomain mysqld[6260]: Warning: Memory not freed: 520
            Jul 12 16:56:03 localhost.localdomain systemd[1]: mariadb.service: Main process exited, code=exited, statu>
            Jul 12 16:56:03 localhost.localdomain systemd[1]: mariadb.service: Failed with result 'exit-code'.
            Jul 12 16:56:03 localhost.localdomain systemd[1]: Failed to start MariaDB 10.3 database server.

Hear는 요구에 따른 자세한 내용을 확인하기 위한 journalctl -xe 출력입니다.설정은 한 번에 완료됩니다.

[root@localhost bggb]# journalctl -xe
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: == Stack trace for context 0x55df8c69>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: #0   7ffd7797b5d0 b   resource:///org>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: #1   7ffd7797b680 b   resource:///org>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: #2   55df8cc77d30 i   resource:///org>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: #3   7ffd7797c610 b   resource:///org>
Jul 12 17:45:52 localhost.localdomain gnome-shell[2874]: Object .Gjs_CapsLockWarning (0x55df8d192040), has>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: #4   55df8cc77ca0 i   resource:///org>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: #5   55df8cc77c20 i   resource:///org>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: == Stack trace for context 0x55df8c69>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: #0   7ffd7797b5d0 b   resource:///org>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: #1   7ffd7797b680 b   resource:///org>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: #2   55df8cc77d30 i   resource:///org>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: #3   7ffd7797c610 b   resource:///org>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: #4   55df8cc77ca0 i   resource:///org>
Jul 12 17:45:52 localhost.localdomain org.gnome.Shell.desktop[2874]: #5   55df8cc77c20 i   resource:///org>
Jul 12 17:45:52 localhost.localdomain gnome-shell[2874]: Object .Gjs_CapsLockWarning (0x55df8d192040), has>
Jul 12 17:45:53 localhost.localdomain NetworkManager[1115]: <info>  [1626092153.0272] agent-manager: agent>
Jul 12 17:46:03 localhost.localdomain systemd[1]: fprintd.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
-- 
-- The unit fprintd.service has successfully entered the 'dead' state.

로그 파일의 이름을 변경하고 MySQL을 시작하는 것이 이 문제를 해결할 수 있습니다.

mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bak 

mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bak

systemctl start mysql

MariaDB 데이터디르는 쓸 수 없는 것 같습니다.가 소유하고 있는지 확인합니다.mysql서브 디렉토리와 함께 사용자:

 chown -R mysql: /var/lib/mysql

데이터디어를 다음 위치로 옮긴 경우/home위의 권한 변경(경로 수정)과 더불어 보호 기능을 비활성화합니다. 인 systemd:

실행:systemctl edit mariadb.service저장하고 종료하기 전에 다음 내용을 에디터에 포함합니다.

 [Service]
 ProtectHome=false

그런 다음 서비스를 재시작합니다.

systemctl restart mariadb.service

datadir를 기본 /var/lib/mysql에서 변경한 경우

semanage fcontext -a -t mysqld_db_t "/mariadb/data(/.*)?"
restorecon -Rv /var/lib/mysql

또한 데이터 시스템이 새로 생성된 파일 시스템인 경우 올바른 selinux 레이블이 필요할 수 있습니다.

restorecon -Rv /var/lib/mysql

자세한 내용은 MariaDB selinux 기술 자료 문서를 참조하십시오.

언급URL : https://stackoverflow.com/questions/68346692/failed-to-start-mariadb-10-3-database-server

반응형