MySQL: unattended Percona Server 5.7 installation

From lxadm | Linux administration tips, tutorials, HOWTOs and articles
Jump to: navigation, search

Percona Server 5.7 needs slightly different answers passed to debconf-set-selections to allow unattended / silent installation:

export MYSQL_ROOT_PASSWORD=some-password
export DEBIAN_FRONTEND=noninteractive

echo "percona-server-server-5.7 percona-server-server-5.7/root-pass password $MYSQL_ROOT_PASSWORD" | debconf-set-selections
echo "percona-server-server-5.7 percona-server-server-5.7/re-root-pass password $MYSQL_ROOT_PASSWORD" | debconf-set-selections

apt install -y percona-server-server-5.7 percona-server-client-5.7