Sub-process /usr/bin/dpkg returned an error (1)

Just going to ignore this one :smiley:.

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:

apt-get purge -y mariadb-common mysql-common libmariadb3
apt-get autoremove -y

Then try again the installation, then it should work fine.

However, the presence of exim4 installer saw. He 'd probably see mysql, too?

It is not a normal case, that on a clean system, the mariadb/mysql cases are installed - that’s why they didnt get detected automatically.

Could the first attempt to install mysql when removed the Exim4?

Please check the related codeparts and you will see, that there will nothing be installed, when it removes exim.

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

apt-get purge -y mariadb-common mysql-common libmariadb3

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.

Installation was started well

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?

As I already wrote, I don’t see any reason to inculde it - this is just not normal, that the mysql packages are present.

Then perhaps we should leave available the possibility of answering the question? So that the installation does not break in the process.