Plesk

MariaDB service status failed after upgrade while Plesk and all databases are available: Could not get an exclusive lock

Symptoms

Cause

The MariaDB upgrade process is not complete or was performed incorrectly.

Resolution

  1. Connect to the server via SSH

  2. Kill the MariaDB processes running in the background:

    # ps awufx | grep mysql | grep -v grep | awk '{print $2}' | while read i; do kill -9 $i; done

  3. Start MariaDB service:

    # systemctl start mariadb

    Note: If MariaDB service fails to start, run again the previous command a couple of times or restart the server

  4. Complete the remaining upgrade guide steps to stop and remove the incorrect service while ensuring the latest is started and enabled:

    Note: Run each line command separately.

    # systemctl restart mariadb
    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
    # systemctl restart mariadb
    # plesk sbin packagemng -sdf
    # systemctl stop mysql; killall mysqld
    # rm /etc/init.d/mysql && systemctl daemon-reload
    # systemctl start mariadb
    # systemctl enable mariadb

Exit mobile version