Pretty much the same as this question but I don't want to have a root password (this is just a dev machine).
Here's what I've got:
export DEBIAN_FRONTEND=noninteractive sudo debconf-set-selections <<< 'mariadb-server-10.0 mysql-server/root_password password PASS' sudo debconf-set-selections <<< 'mariadb-server-10.0 mysql-server/root_password_again password PASS' sudo apt-get install -y mariadb-server
This will install MariaDB silently but it will set the root password to "PASS". If I delete that it does a weird partial install because it's still trying to prompt me.