Setting Up mAirListDB With MySQL On a NAS

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.

3 Likes