HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Install MariaDB without password prompt in Ubuntu

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
withoutinstallubuntupasswordpromptmariadb

Problem

I need to install MariaDB server in Ubuntu without password prompt. For this purpose, I execute the following commands, but it doesn't gave me any progress. It again shows password prompt.

I used the following commands :

export DEBIAN_FRONTEND=noninteractive
  echo mariadb-server-5.5 mariadb-server/root_password password mypass | debconf-set-selections
  echo mariadb-server-5.5 mariadb-server/root_password_again password mypass | debconf-set-selections
  sudo apt-get -y install mariadb-server


I also check some links in stack overflow, but it doesnot worked:

https://stackoverflow.com/questions/8138636/install-mysql-on-ubuntu-natty-without-password-prompt-and-using-shell-variable-a

https://stackoverflow.com/questions/7739645/install-mysql-on-ubuntu-without-password-prompt

Please help me on this regard. Have any wrong with my code?

Solution

A mixture of the mysql/mariadb-Nameing has worked for me:

export DEBIAN_FRONTEND=noninteractive
debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password password rootpass'
debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password_again password rootpass'

Code Snippets

export DEBIAN_FRONTEND=noninteractive
debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password password rootpass'
debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password_again password rootpass'

Context

StackExchange Database Administrators Q#35866, answer score: 6

Revisions (0)

No revisions yet.