2

I'm making a script that installs MariaDB, and I'd like to set a root password. I've got the following in said script:

DEBIAN_FRONTEND=noninteractive

echo mariadb-server-10.0 mariadb-server-10.0/root_password password tmpsetup | debconf-set-selections
echo mariadb-server-10.0 mariadb-server-10.0/root_password_again password tmpsetup | debconf-set-selections
apt-get install -y mariadb-server

This doesn't seem to work, as I can't log into the root account with the "tmpsetup" password. What am I doing wrong?

2
  • I'm experiencing the same on Zesty w/ mariadb-server-10.1. Can't figure out the secret sauce to make this work.
    – Rich Remer
    Jun 20, 2017 at 4:12
  • I'm experiencing the same on Xenial w/ mariadb-server-10.0. Can't figure out the secret sauce to make this work.
    – jah
    Jul 7, 2017 at 11:33

1 Answer 1

0

Please try instead with

DEBIAN_FRONTEND=noninteractive

echo mariadb-server-10.0 mariadb-server/root_password password tmpsetup | debconf-set-selections
echo mariadb-server-10.0 mariadb-server/root_password_again password tmpsetup | debconf-set-selections
apt-get install -y mariadb-server

That way the changes will be applied also to mariadb-server meta-package, and not only for the specific version.

1
  • That didn't work. And I don't think that's correct, because the other MariaDB debconf entries (made by the installer) show up as mariadb-server-10.0.
    – ffxsam
    Jun 30, 2016 at 17:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .