After migrating from MySQL 5.7.16 to MariaDB 10 database fails to start MySQL Server Version is 5.7.16-0ubuntu0.16.04.1 (Ubuntu)

I want to switch over to MariaDB, but I can't get MariaDB to accept the existing database. I also tried doing a slow shutdown with InnoDB Engine and importing the database as .sql created with mysqldump.

The import of the .sql fails because the mysql.user table is different and I need to keep passwords, users and grants.

After migration I am getting this error:


  Fatal error: mysql.user table is damaged or in unsupported 3.20 format.


This is the final error before the DB fails to start.

Also mysql_upgrade does not work.

How should I perform the migration?



Edit:

This didn't work either (Official Bug Report).
Fixed this by dumping the MySQL database and reimporting it with MariaDB.