CAUTION Please ensure backing up a MySQL database directory before proceeding with the below steps.

There is a couple of things to change when migrating MySQL server configuration and databases to MariaDB.

First on startup MariaDB fails to come up due to unsupported configuration settings from the MySQL server my.cnf. The following settings need to be removed:

enforce-gtid-consistency       = 1
gtid-mode                       = ON

Second importing MySQL 8 databases into MariaDB may fail with the following reason:

Unknown collation: utf8mb4_0900_ai_ci

Please ensure MySQL 8 database dump is backed up. After replacing utf8mb4_0900_ai_ci to utf8mb4_unicode_520_ci MySQL 8 database import into MariaDB runs successfully.

The last thing that probably needs updating is reinstating privileges to database users:

grant all privileges on `database-user`@`host-from-which-user access-database` identified by 'database-user-password';
flush privileges;