MySQL 集群无人值守安装

MySQL 集群无人值守安装

我想在无需人工干预的情况下安装 MySQL 集群。我尝试按照官方指南上的步骤操作,但无法正常工作。

我目前所拥有的...

DEBIAN_FRONTEND=noninteractive
sudo apt-get install -y debconf-utils

# set mysql configs
echo "mysql-apt-config mysql-apt-config/select-server select mysql-cluster-7.6" | sudo debconf-set-selections
echo "mysql-apt-config mysql-apt-config/select-tools select Disabled" | sudo debconf-set-selections
echo "mysql-apt-config mysql-apt-config/select-preview select Disabled" | sudo debconf-set-selections
echo "mysql-apt-config mysql-apt-config/select-product select Ok" | sudo debconf-set-selections
echo "mysql-community-server mysql-community-server/root-pass password $SQL_ROOT_PASS" | sudo debconf-set-selections
echo "mysql-community-server mysql-community-server/re-root-pass password $SQL_ROOT_PASS" | sudo debconf-set-selections

# Add apt repository
wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb

使用debconf-set-selections我可以正确设置选择。但是,执行时sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb,我仍然会看到安装屏幕提示我选择软件包。我遗漏了什么吗?

相关内容