Backup of Chart (MySql) to new install with MariaDB

Situation
I am setting up a back up server where should a drive failure happen, I want to have another computer ready to go with simply the install of the backup. Question is: Can the existing MySql database be converted to MariaDB? If not where are the specific prepratory installs requirements for using LM22.1 to be found? (found them for MariaDB but not MySql. BTW - I know enough to just be dangerous.

OpenEMR Version
7.01

Browser:
I’m using: Firefox, Chrome, et al

Operating System
I’m using: Linux Mint 22.1

Search
Did you search the forum for similar questions? yes

Logs
N/A
Did you check the logs?
Was there anything pertinent in them?
Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All

In general, yes, you can move a MySQL database to MariaDB.
There may be specific steps that you need to take to deal with table collation & character set parameters when switching.
I’ve switched all new installs from MySQL to MariaDB, since MySQL 8 is pretty much a rolling dumpster fire, & the future for MySQL under Oracle is a huge question mark.
You need to determine exactly which version of MySQL you are using, which version of MariaDB you intend to use as an alternative, and then research for known issues.
If you just want to debug it the old fashioned hard way, make a backup of your database from MySQL, set up a test instance of MariaDB elsewhere, and try to restore the backup. If it restores completely and the table structure passes a health check, then try using it with OpenEMR, see what errors you encounter and solve them until the system works.

The two versions are starting to diverge. At some point OpenEMR will have to take a stance and choose one DB engine over the other. Our current DB abstraction layer AdoDB is struggling with some of the newer db functionalities that exist.

My vote is to go with MariaDB but we’ll have to decide as admins I expect in the next year or two to choose one, either that or switch out our Data Access Layer (DAL) for a new one.

1 Like

Yes, I saw that coming too. “Do you hear that, Mr. Anderson? That, is the sound of inevitability.” OK, no more bad Matrix jokes…
Anyway, we ended up moving all our long term sites from MySQL to MariaDB, because it’s relatively simple to migrate a healthy production database from MySQL 5.x to MariaDB 10.x or 11.x. Whereas migrating from MySQL 5.x to MySQL 8 always seems to cause problems, and then once you do finally get the database itself working in MySQL 8, it ends up having a bunch of weird collations and character sets in the schema that throw fatal errors during OpenEMR version upgrades. Then you can either fight with MySQL 8 for days or weeks trying to find solutions, or just cut the cord , reload the tables in Maria, and move on. After the 2nd or 3rd time working with upgrades from version 4 or 5 to version 7, I just made an executive decision that MySQL 8 wasn’t going to be installed anymore, not worth the headaches and potential future concerns for migrations. I’m sure others will have differing opinions but I’d agree with the choice of MariaDB when it comes down to making a decision. Apparently the XAMPP project folks felt the same way.