Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hendrauzia/5184565 to your computer and use it in GitHub Desktop.
Save hendrauzia/5184565 to your computer and use it in GitHub Desktop.
Secure Installation of MySQL Server 5.5 on Ubuntu Server 12.04 LTS
# run as superuser
sudo -s
# setup unattended installation by using here-strings
# if you skip this, you will have to type in your password in the installation wizard.
debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password password YOUR_PASSWORD'
debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password_again password YOUR_PASSWORD'
# install mysql server
apt-get -y install mysql-server
# secure your mysql installation
# answer the asked questions (preferably yes to all questions).
mysql_secure_installation
# clear the history to remove sensitive data
history -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment