3

I'm looking for provisioning a Debian 8.2 Virtualbox VM with MariaDB 10.

I use the following :

sudo export DEBIAN_FRONTEND=noninteractive
sudo debconf-set-selections <<< "mariadb-server mariadb-server/root_password password $ROOTDBPWD"
sudo debconf-set-selections <<< "mariadb-server mariadb-server/root_password_again password $ROOTDBPWD"
sudo debconf-set-selections <<< "mariadb-server mariadb-server/oneway_migration boolean true"
sudo apt-get install mariadb-server -y

When running, the script stop I think due to the last prompt "oneway_migration boolean true" because I can see this prompt unformatted in the console (even with "export DEBIAN_FRONTEND=noninteractive").

This is what I get before the script stops :

──────────┤ Configuring mariadb-server-10.0├────────────
MariaDB is a drop-in replacement for MySQL. It will use your current configuration file (my.cnf) and current databases.
Note that MariaDB has some enhanced features, which do not exist in MySQL and thus migration back to MySQL might not always work, at least not as automatically as migrating from MySQL to MariaDB.
Really migrate to MariaDB? <Yes><No>

Can anyone give me a hand on this or share the way they provision MariaDB 10(or more) with a shell script?

Thanks, Regards

  • are you migrating from mysql server to mariadb server in the vbox instance ? the last debconf-set-selection is normaly not needed if you are installing in first place, are you installing mariadb from debian repos or from mariadb repos ? – Yonsy Solis Jan 07 '16 at 04:18
  • 1
    @YonsySolis : You're right! I had to perform clean uninstall of mysql and after this I only have error on the root pwd. – Erick Loitiere Jan 07 '16 at 19:43
  • // , Can you rephrase the title for this as a question? – Nathan Basanese Jun 12 '18 at 01:31

1 Answers1

2

the problem is that the questions don't come from package mariadb-server, the questions come from mariadb-server-10.0 (the first install the later one).

change your debconf set selections to:

sudo debconf-set-selections <<< "mariadb-server-10.0 mariadb-server/root_password password $ROOTDBPWD"
sudo debconf-set-selections <<< "mariadb-server-10.0 mariadb-server/root_password_again password $ROOTDBPWD"
sudo debconf-set-selections <<< "mariadb-server-10.0 mariadb-server/oneway_migration boolean true"
Yonsy Solis
  • 284
  • 1
  • 9
  • Thank you for your help. Is there a way to use something like mariadb-server-* or I need to mariadb-server-10.0 ? – Erick Loitiere Jan 07 '16 at 19:39
  • `man debconf-set-selections` ... `... The first value is the name of the package that owns the question ...` no `*` mentioned ... – Yonsy Solis Jan 07 '16 at 23:39