You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

重装MariaDB后启动失败:mariadb.service报错求助

Fix MariaDB Startup Failure (ExecStartPost /etc/mysql/debian-start exited with status 203/EXEC)

Looking at your systemd status logs, the critical error here is:

Process: 10036 ExecStartPost=/etc/mysql/debian-start (code=exited, status=203/EXEC)

A 203/EXEC status typically means the system can't run the specified script—either the file is missing, permissions are incorrect, or leftover MySQL configuration is interfering with your fresh MariaDB install. Let's walk through targeted fixes step by step:

Step 1: Check the debian-start script's existence and permissions

First, confirm the script is present and accessible:

ls -l /etc/mysql/debian-start
  • If the file doesn't exist: Your MariaDB installation likely missed this critical component. We'll reinstall core packages to restore it.
  • If the file exists: Ensure it has 755 permissions and is owned by root:root. Fix permissions with:
sudo chmod 755 /etc/mysql/debian-start
sudo chown root:root /etc/mysql/debian-start

Step 2: Reinstall MariaDB core packages

If the script is missing or permission fixes don't resolve the issue, reinstall the main MariaDB packages to restore all default files:

sudo apt-get install --reinstall mariadb-server mariadb-common

This command will redownload and deploy all necessary components, replacing any missing or corrupted files.

Step 3: Clean up residual MySQL/MariaDB data and configs

Since you uninstalled MySQL first, leftover files might be causing conflicts. Let's wipe them and reinitialize MariaDB:

  1. Backup your current config (optional but recommended):
sudo cp -r /etc/mysql /etc/mysql_backup
  1. Delete all existing MariaDB/MySQL data and config directories:
sudo rm -rf /etc/mysql
sudo rm -rf /var/lib/mysql
  1. Reinitialize the MariaDB database:
sudo mariadb-install-db --user=mysql --datadir=/var/lib/mysql
  1. Try starting the service again:
sudo systemctl start mariadb

Step 4: Remove conflicting systemd drop-in config

Your status shows a migrated config from MySQL: /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf. This might have incompatible settings for MariaDB:

  1. Backup the config first:
sudo cp /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf /tmp/
  1. Delete the conflicting drop-in:
sudo rm /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
  1. Reload systemd and restart MariaDB:
sudo systemctl daemon-reload
sudo systemctl start mariadb

Verify the Fix

Check if MariaDB is running with:

sudo systemctl status mariadb

If you see active (running), you're all set. You can also test logging in to confirm functionality:

sudo mariadb -u root -p

内容的提问来源于stack exchange,提问作者Med Farih

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 20:08:12