Skip to content

Instantly share code, notes, and snippets.

@bsweger
Last active May 1, 2019 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bsweger/1202410 to your computer and use it in GitHub Desktop.
Save bsweger/1202410 to your computer and use it in GitHub Desktop.
initial MySQL setup before hooking up a Django project
#create the database
CREATE DATABASE [dbname] CHARACTER SET utf8;
#create user
CREATE USER 'django_user'@'localhost' IDENTIFIED BY 'thepassword';
#give user permissions to db (probably not a great idea to GRANT ALL unless you really have to)
# (replace django.* with [mydatabasename].*)
GRANT ALL ON django.* TO 'django_user'@'localhost';
@aleemahmed96
Copy link

Thanks for your contribution. <3

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