![Maria.db 服务无法在 Ubuntu 中启动。InnoDB:innodb_system 数据文件“ibdata1”必须可写](https://linux22.com/image/765521/Maria.db%20%E6%9C%8D%E5%8A%A1%E6%97%A0%E6%B3%95%E5%9C%A8%20Ubuntu%20%E4%B8%AD%E5%90%AF%E5%8A%A8%E3%80%82InnoDB%EF%BC%9Ainnodb_system%20%E6%95%B0%E6%8D%AE%E6%96%87%E4%BB%B6%E2%80%9Cibdata1%E2%80%9D%E5%BF%85%E9%A1%BB%E5%8F%AF%E5%86%99.png)
当我尝试重新启动 mariadb.service 时收到以下错误消息:
● mariadb.service - MariaDB 10.4.12 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Wed 2021-04-07 19:11:55 +03; 7s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 4817 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 4743 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: 4736 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 4726 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 4817 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Apr 07 19:11:55 khsbrrds01 mysqld[4817]: 2021-04-07 19:11:55 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
Apr 07 19:11:55 khsbrrds01 mysqld[4817]: 2021-04-07 19:11:55 0 [ERROR] Plugin 'InnoDB' init function returned error.
Apr 07 19:11:55 khsbrrds01 mysqld[4817]: 2021-04-07 19:11:55 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Apr 07 19:11:55 khsbrrds01 mysqld[4817]: 2021-04-07 19:11:55 0 [Note] Plugin 'FEEDBACK' is disabled.
Apr 07 19:11:55 khsbrrds01 mysqld[4817]: 2021-04-07 19:11:55 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
Apr 07 19:11:55 khsbrrds01 mysqld[4817]: 2021-04-07 19:11:55 0 [ERROR] Failed to initialize plugins.
Apr 07 19:11:55 khsbrrds01 mysqld[4817]: 2021-04-07 19:11:55 0 [ERROR] Aborting
Apr 07 19:11:55 khsbrrds01 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Apr 07 19:11:55 khsbrrds01 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Apr 07 19:11:55 khsbrrds01 systemd[1]: Failed to start MariaDB 10.4.12 database server.
我该如何解决这个问题?操作系统:Ubuntu 18.04