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 aptitude/apt-get or yum, this is what I have so far:if [ $OS == 'centos' ]; then    yum -y install  mysql-server > /dev/null 2>&1elif [ $OS == 'ubuntu' ]; then    aptitude -y install mysql-server > /dev/null 2>&1fiIt 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?
Install MySQL from Bash Script
ubuntu;centos;yum;apt;mysql
You can use the DEBIAN_FRONTEND environment variable.DEBIAN_FRONTEND=noninteractive aptitude -y install mysql-server > /dev/null 2>&1or if you will run more than 1 install you might want to add an export to the top of your scriptexport DEBIAN_FRONTEND=noninteractiveaptitude -y install mysql-server > /dev/null 2>&1