MIDAS Knowledge Base
Fix "Database may not be compatible with this version of MIDAS" errorWhenever 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:
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:
- 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.
- You've recently performed a server/database restore and "rolled back" either server files or databases to an earlier point in time.
- 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;
- Let's say you're currently running MIDAS v4.30 on your server.
- The most recent version of MIDAS available to you under your license is v4.34.
- You wish to relocate MIDAS to a new server.
- 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).
- You then copy the MySQL / MariaDB database from your MIDAS v4.30 system over to your new server running MIDAS v4.34.
- 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;
- 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.
- On the 3rd of the month you update your MIDAS system from v4.30 to v4.34.
- On the 23rd of the month your server experiences a hardware failure meaning data has to be restored from the last known good backups.
- 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).
- 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.
- 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:
- Locate the midas.dat file within the MIDAS installation on your server, and open it in a standard text editor.
- Within the file, locate the string:
"version" : "4.xx",
(where v4.xx is the current version of MIDAS you're running).
- 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",
- Also within the midas.dat file locate the string:
"builddate" : "xxxxxxxxxx",
(where xxxxxxxxxx will be a large integer value).
- Modify the "builddate" value to be zero, so that it reads:
"builddate" : "0",
- Save changes to the midas.dat file back to your server.
- Login to your MIDAS system (you should no longer see a warning about a version mismatch).
- Proceed to update your MIDAS system (via MIDAS Admin Options → Manage MIDAS → Update).
- 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:
- Backup your MIDAS MySQL or MariaDB database (i.e. via a sqldump or a tool such as phpMyAdmin).
- Re-install MIDAS over the top of its current location (download and run the MIDAS installer).
- Once MIDAS is reinstalled, import the database backup you took in step 1, replacing the new database which was populated during reinstall.
- Your MIDAS system and database should then be compatible with each other.
← Return to the Knowledge Base