我正在寻找使用 MariaDB 10 配置的 Debian 8.2 Virtualbox VM。
我使用以下内容:
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
运行时,我认为脚本因最后提示“oneway_migration boolean true”而停止,因为我可以在控制台中看到此提示未格式化(即使使用“export DEBIAN_FRONTEND=noninteractive”)。
这是我在脚本停止之前得到的结果:
──────────┤ 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>
有人能帮我一下吗,或者分享他们使用 shell 脚本配置 MariaDB 10(或更高版本)的方法吗?
感谢和问候
答案1
问题是问题不是来自包mariadb-server
,问题来自mariadb-server-10.0
(第一个安装后者)。
将您的 debconf 设置选择更改为:
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"