Last active
May 1, 2019 20:18
-
-
Save bsweger/1202410 to your computer and use it in GitHub Desktop.
initial MySQL setup before hooking up a Django project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for your contribution. <3