This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install MySQL | |
mysql_config_file="/etc/mysql/my.cnf" | |
echo "mysql-server mysql-server/root_password password secret" | sudo debconf-set-selections | |
echo "mysql-server mysql-server/root_password_again password secret" | sudo debconf-set-selections | |
apt-get -y install mysql-client mysql-server | |
sed -i "s/bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" ${mysql_config_file} | |
usermod -d /var/lib/mysql/ mysql |