MIDAS Knowledge Base MIDAS Knowledge Base

Fix "Database may not be compatible with this version of MIDAS" error

Whenever your MIDAS system is updated to a newer version, two things happen.

Firstly, the physical application files on your server which make up the MIDAS software are modified.

Secondly, the back-end database for your MIDAS system is also updated.

In order for MIDAS to function correctly, both the program files and the database need to be compatible with each other.

MIDAS (v4.22 and later) performs checks to ensure that its database is compatible with the version of MIDAS you're currently running. If they are not compatible, MIDAS will warn you:

current database not compatible with this version of MIDAS

The "Expected" version is the version of the physical files within your MIDAS system. The "Detected" version is the version of the data within your MIDAS database.Running a mismatched version of a MIDAS databases with your MIDAS system files may lead to unexpected behavior which could result in data loss.

In normal circumstances, you should never encounter a warning that your database may not be compatible with the version of MIDAS you're running. However, should you see this message then the cause is most likely due to one of the following:

  1. You've recently changed servers. Rather than following our How to relocate MIDAS to a new server instructions, you've instead performed a "fresh" install of MIDAS on your new server and then copied your previous MIDAS database across.
  2. You've recently performed a server/database restore and "rolled back" either server files or databases to an earlier point in time.
  3. The MIDAS update process was interrupted or was unable to complete for some other reason (i.e. restrictive file/folder or database permissions preventing files or the database from being modified)

Any of the above scenarios could potentially lead to this warning being shown. To understand why, let's look at some example following scenario;

  1. Let's say you're currently running MIDAS v4.30 on your server.
  2. The most recent version of MIDAS available to you under your license is v4.34.
  3. You wish to relocate MIDAS to a new server.
  4. You install a fresh copy of MIDAS on your new server (this will install the most recent version available to you, which in this example is v4.34).
  5. You then copy the MySQL / MariaDB database from your MIDAS v4.30 system over to your new server running MIDAS v4.34.
  6. The result is that your new server is then running MIDAS v4.34, but with an incompatible database from an older version of MIDAS (v4.30).

Here's a second example scenario;

  1. Let's say you take daily backups of your MySQL server, and monthly backups of the physical files on your server on the 1st of every month.
  2. On the 3rd of the month you update your MIDAS system from v4.30 to v4.34.
  3. On the 23rd of the month your server experiences a hardware failure meaning data has to be restored from the last known good backups.
  4. You restore physical server files to the date of the last backup (1st of the month). MIDAS files then revert to v4.30 (as this was the version you were running on 1st of the month prior to updating).
  5. You restore your MySQL server databases to their last good backup (i.e. 22nd of the month). At this point in time the database was for MIDAS v4.34.
  6. The result is that your server is then running MIDAS v4.30, but with an incompatible database from a newer version of MIDAS (v4.34).

Whilst the likelihood of such scenario occurring is extremely low, there are some pro-active steps you can take to mitigate each;

Firstly, should you ever wish to move/relocate MIDAS to a new server, please ensure that your MIDAS system is up-to-date in the first instance. To do this, please check for and obtain updates from within the software via MIDAS Admin Options → Manage MIDAS → Update. Once your MIDAS system is up-to-date, please follow our "How to relocate MIDAS to a new server" guide.

Secondly, should you ever need to perform a partial/full restore of your web server for any reason, please ensure that you restore both the physical files which make up your MIDAS install and its corresponding database back to the same point in time.

If however you've not taken the above steps or are now faced with a warning that the current database isn't compatible with your version of MIDAS, this may be resolved in the following ways:

If the expected database version is higher than the detected version:

Please perform the following steps:

  1. Locate the midas.dat file within the MIDAS installation on your server, and open it in a standard text editor.
  2. Within the file, locate the string:
    "version" : "4.xx",
    (where v4.xx is the current version of MIDAS you're running).
  3. Modify the "version" value to reflect the version that MIDAS tells you it detected in its warning. For example, if MIDAS informs you that the detected version is "v4.30", then modify the string to read:
    "version" : "4.30",
  4. Also within the midas.dat file locate the string:
    "builddate" : "xxxxxxxxxx",
    (where xxxxxxxxxx will be a large integer value).
  5. Modify the "builddate" value to be zero, so that it reads:
    "builddate" : "0",
  6. Save changes to the midas.dat file back to your server.
  7. Login to your MIDAS system (you should no longer see a warning about a version mismatch).
  8. Proceed to update your MIDAS system (via MIDAS Admin Options → Manage MIDAS → Update).
  9. After updating, your MIDAS system and database should again be compatible with each other.

If the expected database version is lower than the detected version:

Please perform the following steps:

  1. Backup your MIDAS MySQL or MariaDB database (i.e. via a sqldump or a tool such as phpMyAdmin).
  2. Re-install MIDAS over the top of its current location (download and run the MIDAS installer).
  3. Once MIDAS is reinstalled, import the database backup you took in step 1, replacing the new database which was populated during reinstall.
  4. Your MIDAS system and database should then be compatible with each other.

You might also be interested in...


MIDAS » KB » Support » Article 00202

← Return to the Knowledge Base