I'm coding a bash script to automate the process of deploying VPS servers but I'm having some trouble while trying to install MySQL from either
yum, this is what I have so far:
if [ "$OS" == 'centos' ]; then yum -y install mysql-server > /dev/null 2>&1 elif [ "$OS" == 'ubuntu' ]; then aptitude -y install mysql-server > /dev/null 2>&1 fi
It seems that the script keeps running ad infinitum, I suspect the problem is because the
mysql-server package seems to bring up a wizard to specify the MySQL root password, but I've no idea how to overcome or fill the password from within the script.
Does anyone know how I can work around this problem?