Within the same base version (for example MySQL 5.5 -> MariaDB 5.5, MySQL 5.6 -> MariaDB 10.0 and MySQL 5.7 -> MariaDB 10.2) you can in most cases just uninstall MySQL and install MariaDB and you are good to go. There is no need to dump and restore databases.
Do I need to install MySQL before MariaDB?
Within the same base version (for example MySQL 5.5 -> MariaDB 5.5, MySQL 5.6 -> MariaDB 10.0 and MySQL 5.7 -> MariaDB 10.2) you can in most cases just uninstall MySQL and install MariaDB and you are good to go. There is no need to dump and restore databases.
Does MariaDB install MySQL?
MariaDB and MySQL packages conflict because they provide similar files. So, you can only install one of them, either MariaDB or MySQL, but not both. In addition you can also install MySQL commmunity edition (8.0 or 5.7) from the repository maintained by Oracle/MySQL itself.
Can MariaDB be used instead of MySQL?
Yes, it is possible to replace MySQL with MariaDB. MariaDB is considered to be a drop-in replacement for the corresponding MySQL version (i.e MariaDB 10.2 and MySQL 5.7). Please review feature differences between MariaDB and MySQL to make sure the switch won’t affect applications using database server.