Setting Up mAirListDB With MySQL On a NAS

Switching the database backend (local to MySQL or MySQL to PostgreSQL) You can not directly clone the database because there needs to be some conversion done.

But it is pretty straight forward. Now as you have setup your new backend and still have your old backend (local) available. You launch the mAirlist Database select your local database on startup and somewhere in the Menu you will find Import and Export funktion. Choose CSV as the target to export.

Than close your mAirlist database and open it again. Now choose your new MySQL Backend. Here you can import the CSV File you have exported before.

Actually I’m not sure if you have to initialise the Database first like in your screenshot

Or if you can just start the import, just give it a try.

Does it make a difference if I choose “CSV file”, “CSV file (without ID’s)” or "CSV file (zero-padded ID’s)?

I already have the database initialised :worried:

I used the first option, I guess it is best for a fresh start on a new backend.

Than just go ahead and start importing.

No luck on this. Tried several export / import options.

After reading some threads in this forum, I think I must use the “clone database” option.

@UliNobbe @Torben Can you please help, starting from here:

BTW: there is no option “Networked (MySQL)” available, only “mAirListDB (mySQL)”?

Ok, so you want to migrate your existing (local mode) mAirListDB to a MySQL backend, right?

This is what “Clone database” in the DB App (Database → Export → Clone Database) is made for. Works for any SQL type (networked or local mode) for source and target.

These are the steps to perform:

  1. Create user and empty SQL database in your MySQL server. Do not add the connection to the mAirList configuration at this time! In particular, do not perform the initial setup (create tables) in the config! The database must be entirely empty, and no tables created! (@Adriaan, just remove and recreate the database in the MySQL administration to start over.)

  2. Open the DB app (of the existing local mode app) and go to Database → Export → Clone database. Select MySQL as the target type, and enter IP/user/password/database as required. Cloning will copy the tables row by row, so it might take a long time. You can choose to transfer only part of the playlist history to speed up the process.

  3. When the cloning is done, close the DB app and make sure no mAirList.exe process is running anymore.

  4. Go to the config, Databases section, and remove the existing local mode DB connection.

  5. Then add a new connection of type “mAirListDB (MySQL)”, enter host/etc. again, and use the “Test login” button to check if everything is working.

Step 4 (remove old connection) is very important; there must not be the original and the cloned connection set up at the same time, this would confuse the system because both databases have the same ID. Removing the connection will not delete the .mldb file. You can and should keep it as a backup, and you can re-add it anytime later as a local mode connection if anything goes wrong, or you need to restart the clone for any reason.


@Torben Thank you for your clear roadmap, migrating my local mAirListDB to MariaDB5 on Synology.

Followed your steps, unfortunately in step 2 this error comes up:


Do I have to check “change database ID to…” BTW?

I’ve had this problem before:

Should be solved now, which version are you running?

mAirList Professional Studio version 6.3.12 build 4441

Check your library if there are any items with a “Loudness” value of “-INF”. (You can add Loudness as a library column in the View menu, and then sort by that column.)

It was caused by a bug in the R128 scanner in earlier versions. Not a real problem until you try to use the Clone function :wink:

Use Mass Edit to re-do the loudness scan for these items. The -INF should go away in favor of just an empty entry. Then retry to the clone.

“Change Database ID” is only necessary if you want to use the old (local) and new (SQL) databases side by side. If you remove the old connection as described in my earlier post, don’t change the ID.

Tonight I also changed the lokal db to my sql.
Almost at the eind I also get a fault a file was bigger as expected.
The database looked fine but I noticed that all the history, last played is missing.
Any chance to get it back.
I still have the original lokal db file.

What was the exact message?

Tonight I run the clone again and make a picture just like Adriaan.

I thought after reading the instructions this takes all night but less than 10 min.

A big thank you, Torben, all running and works like a charm!

Run the clone again.
This is the message: [FireDAC][Phys][MySQL] Got a packet bigger than 'max_allowed_packet’bytes

Done it again but now whit out saving playlist and then it runs till the end :smiley:
And I don’t need old playlist’s so it’s fine by me.

So also a Big thanks Torben and Tondose


Hi Henk, Hi Torben, also untick Icons to make the Clone work. @Torben See Bugreport earlier Today.

Cheers Wilbert

1 Like

My nas (Synology) runs on 6.2 yesterday I got an email that support ends 24 Oktober. You should upgrade to 7 but 7 don’t support maria bd 5. So I need to upgrade to Maria db 10 before I upgrade to version 7. On the Synology website it looks quite simple export the database in maria db 5 and Import it in 10. Are there additional staps in mairlist to make or is it that simple?

Schermafbeelding 2023-12-21 194437

Try to clone the database , get tis message . anny smart way to remove the items

Apparently some leftover data from deleted items. Should not happen, but SQLite is not so strict about foreign keys.

You can repair it like this in the SQL Console (DB App About menu):

DELETE FROM item_attributes WHERE item NOT IN (SELECT idx FROM items);

(Remember to keep a backup when fiddling around!)