It looks like you have some mysql packages already installed on the system, which needs an answer but then fail, because the apt-get is triggered in silence mode (-qq). I suggest to remove them prior to the installation, I don’t see any need why they should be on a clean system:
The first attempt of start apt-get purge -y mariadb-common mysql-common libmariadb3 give out:
E: dpkg was interrupted, you must manually run ‘dpkg --configure -a’ to correct the problem.
dpkg --configure -a
Setting up mysql-common (1:10.4.12+maria~buster) …
Configuration file ‘/etc/mysql/my.cnf’ (actually ‘/etc/mysql/mariadb.cnf’)
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer’s version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** my.cnf (Y/I/N/O/D/Z) [default=N] ? N
dpkg: warning: while removing mariadb-common, directory ‘/etc/mysql’ not empty so not removed
apt-get autoremove -y
The following packages will be REMOVED:
guile-2.2-libs libevent-2.1-6 libgc1c2 libgnutls-dane0 libgsasl7 libkyotocabinet16v5 libltdl7 liblzo2-2 libntlm0 libpython2.7 libunbound8 mailutils-common
0 upgraded, 0 newly installed, 12 to remove and 1 not upgraded.
I don 't know why I had mysql on the empty server. It 's probably some sort of “hosting debian 10” Perhaps these commands should be added to the installer?