MIDAS Knowledge Base
How to fix "database may not be compatible with this version of MIDAS" warningsWhenever your MIDAS system is updated, the physical application files on your server which make up the MIDAS software are modified. For some updates, changes may also be made to the underlying database structure too.
In order for MIDAS to function correctly, both the program files and the database need to be compatible with each other.
Starting with v4.22, MIDAS 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:
Running mismatched versions of MIDAS databases with your MIDAS system files may lead to unexpected behavior which could result in data loss.
In normal circumstances, You shouldn't ever 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.
Either of the above scenarios could potentially lead to this warning being shown. To understand why, let's look at the following scenario;
- Let's say you're running MIDAS v4.15 on your server.
- The most recent version of MIDAS available under your license is v4.22.
- 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.22).
- You then copy the MySQL database from your MIDAS v4.15 system over to your new server running MIDAS v4.22.
- The result is that your new server is then running MIDAS v4.22, but with an incompatible database from an older version of MIDAS (v4.15).
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.15 to v4.22.
- 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.15 (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.22.
- The result is that your server is then running MIDAS v4.15, but with an incompatible database from a newer version of MIDAS (v4.22).
Whilst the likelihood of either 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 and 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.15", then modify the string to read:
"version" : "4.15",
- 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 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 Knowledge Base