Skip to content

Instantly share code, notes, and snippets.

@marcusandre
Created October 21, 2013 19:25
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 marcusandre/7089424 to your computer and use it in GitHub Desktop.
Save marcusandre/7089424 to your computer and use it in GitHub Desktop.
Install MySQL Server on a Ubuntu machine without a password
#!/usr/bin/bash
debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password password rootpass'
debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password_again password rootpass'
apt-get update
apt-get -y install mysql-server-5.5
@marcusandre
Copy link
Author

change rootpass to your desired root password.

@marcusandre
Copy link
Author

Another one:

export DEBIAN_FRONTEND=noninteractive
apt-get -q -y install mysql-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment