Skip to content

Instantly share code, notes, and snippets.

@kmassada
Created April 15, 2015 14:47
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 kmassada/ab7c47d468cc2eb6971d to your computer and use it in GitHub Desktop.
Save kmassada/ab7c47d468cc2eb6971d to your computer and use it in GitHub Desktop.
Create sql database and user
SITE="laravel"
USER="dev"
cat >> $SITE-setup.sql << EOF
CREATE DATABASE ${SITE};
GRANT ALL PRIVILEGES ON ${SITE}.* TO '${USER}'@'localhost' identified by '';
FLUSH PRIVILEGES;
EOF
mysql -u root -p < $SITE-setup.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment