Articles in this section

PleskSQLServer (MariaDB or MySQL) is not starting on Plesk server after Acronis Cyber Protect involvement: "Can't find file: '.\mysql\db.MAI'"

Plesk for Windows ext: acronis

Applicable to:

  • Plesk for Windows

Symptoms

  • PleskSQLServer (MariaDB or MySQL) does not start after upgrade on a server where Acronis Cyber Protect is installed and running

  • An attempt to enter the Plesk GUI results in the following error:

    PLESK_ERROR: Server Error
    500 Plesk\Exception\Database
    DB query failed: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it
    Type Plesk\Exception\Database
    Message DB query failed: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it
    File Mysql.php
    Line 79

  • An attempt to run the Plesk login command in Command-Prompt results in the following output:

    C:\> C:\Users\Administrator>plesk login
    DB query failed: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it

    exit status 1

  • The Plesk SQL Server is displayed as not running in the Plesk Services Monitor:

  • An attempt to restart the Plesk SQL Server via the Plesk Services Monitor results in the following error:

    CONFIG_TEXT: Incorrect function. (Error code 1) at Start service PleskSQLServer
    at (service:::startStopService line 997)

  • The error logs at %plesk_dir%MySQL\Data\<example>.err display errors that are similar to the following:

    CONFIG_TEXT: 2024-06-14 12:48:46 0 [ERROR] Could not open mysql.plugin table: "Can't find file: '.\mysql\plugin.MAI' (errno: 2 "No such file or directory")". Some plugins may be not loaded
    2024-06-14 12:48:46 0 [ERROR] Can't open and lock privilege tables: Can't find file: '.\mysql\servers.MAI' (errno: 2 "No such file or directory")
    2024-06-14 12:48:46 0 [Note] Server socket created on IP: '::'.
    2024-06-14 12:48:46 0 [Note] Server socket created on IP: '0.0.0.0'.
    2024-06-14 12:48:46 0 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: '.\mysql\db.MAI' (errno: 2 "No such file or directory")
    2024-06-14 12:48:46 0 [ERROR] Aborting

  • The following Acronis processes can be seen as running in the Task Manager:
  • The following notification from Acronis Cyber Protect may pop up on the right of your Windows taskbar

    cyberprotect.png

Cause

The %plesk_dir%MySQL\bin\mysqld.exe file is false-positively quarantined as ransomware by Acronis Cyber Protect, due to which some of the crucial files within the %plesk_dir%MySQL\ directories have gone missing (most commonly .\mysql\plugin.MAI and .\mysql\servers.MAI and this prevents Plesk SQL Server from starting.

The issue has already been addressed on the side of Acronis Cyber Protect via its 24.4 update.

Resolution

For any servers that are already affected by this issue, you must execute the following steps:

1. Whitelist the following binaries locations in the local environment protection plan(s) in Acronis Cyber Protect console:

  • "%plesk_dir%MySQL\bin\mysqld.exe" (or the equivalent full path such as C:\Program Files (x86)\Plesk\MySQL\bin\mysqld.exe) as trusted Process.
  • "%plesk_dir%\MySQL\" (or the equivalent full path such as C:\Program Files (x86)\Plesk\MySQL\) as trusted Folder.

    Note: You may also want to add all Plesk-related directories as exclusions to your antivirus software scanner by using the information in the Which directories should be added to antivirus exclusion on a Plesk for Windows server? article

2. Reinitialize PleskSQLServer as described in the Re-initialize PleskSQLServer section of the How to fix InnoDB corruption cases for the MySQL/MariaDB databases on Plesk for Windows article.

3. Update your Acronis Cyber Protect agent to the latest version

 

Was this article helpful?

Comments

1 comment
Date Votes
  • Some kind of "Ransomware Protection" by Acronis Cyber Backup absolutely destroyed my Plesk for windows testing instance - I'm not even able to repair it by completely uninstalling Plesk and trying to install it back into the existing directory (I'd like to keep the Plesk DB config, although it's only an environment for testing)

    At least now I'm warned to have an eye on the "real-time protection" feature by Acronis, in case some of our customers need to backup their Windows vServers running with Plesk

    2

Please sign in to leave a comment.