Добрый вечер, пытаюсь написать скрипт на bash, только не пойму одного момента, почему он задаёт пароль root и не входит с ошибкой " #1698 Невозможно подключиться к серверу MySQL". Вот собственно сам код:
apt-get install -y pwgen
MYSQLPASS=$(pwgen -cns -1 12)
log_t "Install MySQL"
echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | debconf-set-selections
echo mysql-apt-config mysql-apt-config/select-product select Ok | debconf-set-selections
echo mysql-server mysql-server/root_password select "$MYSQLPASS" | debconf-set-selections
echo mysql-server mysql-server/root_password_again select "$MYSQLPASS" | debconf-set-selections
wget https://dev.mysql.com/get/mysql-apt-config_0.8.9-1_all.deb
export DEBIAN_FRONTEND=noninteractive
dpkg -i mysql-apt-config_0.8.9-1_all.deb
apt-get update
apt-get --yes --force-yes install mysql-community-server
rm mysql-apt-config_0.8.9-1_all.deb
log_t "Install phpMyAdmin"
echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | debconf-set-selections
echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | debconf-set-selections
echo "phpmyadmin phpmyadmin/mysql/admin-pass password $MYSQLPASS" | debconf-set-selections
echo "phpmyadmin phpmyadmin/mysql/app-pass password $MYSQLPASS" |debconf-set-selections
echo "phpmyadmin phpmyadmin/app-password-confirm password $MYSQLPASS" | debconf-set-selections
echo 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2' | debconf-set-selections
apt-get install -y phpmyadmin