Skip to content

Instantly share code, notes, and snippets.

@chrismanderson
Created May 30, 2012 18:48
Show Gist options
  • Save chrismanderson/2838249 to your computer and use it in GitHub Desktop.
Save chrismanderson/2838249 to your computer and use it in GitHub Desktop.
clarified gist

To set the root user password. From terminal.

 /usr/local/Cellar/mysql/5.5.20/bin/mysqladmin -u root password 'enter_a_password'

Then do

 mysql --user=root --password=enter_a_password

In the mysql command prompt:

For DB_NAME, ENTER_DB_PASSWORD, ENTER_DB_USER, enter values of your choosing.

 create database DB_NAME;
 grant all on DB_NAME.* to 'ENTER_DB_USER'@'localhost' identified by 'ENTER_DB_PASSWORD';
 flush privileges;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment