The initial migrations for the IDM created SQL that MariaDB is rather upset about.
Please delete all tables in the "idm" database on M5. The tables contain no data, and the IDM is not in production, so no reason to do backups, it's fine to simply delete the tables.