MariaDB 10.0.25 installs without configuration
It appears You had some MySQL/MariaDB/Percona instance previously installed, and some of data and config files were left in Your OS.

The way that worked for me on that case (Ubuntu Xenial 16.04 LTS with MariaDB 10.0 installed), with forgotten Maria's root password, was:


purging everything: sudo apt-get purge mariadb*
reboot; it didn't work without it, probably some related service running in background, locking some files from being purged: sudo reboot -h now
installing database once again: sudo apt-get install mariadb-server


Of course this was possible only on private dev machine, without any important data.