BUILD IN DJANGO WITH MYSQL DATABASES
rizwan@ubuntu$ sudo apt-get install awscli
/* FIND YOUR ACCESS KEY AND SECRET KEY FROM AWS IN SECUIRTY CREDENTIALS */
rizwan@ubuntu$ aws configure
enter details of access key and secret key
or
rizwan@ubuntu$ export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
rizwan@ubuntu$ export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
rizwan@ubuntu$ export AWS_DEFAULT_REGION=us-west-2
C:\> setx AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
C:\> setx AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
C:\> setx AWS_DEFAULT_REGION=us-west-2
mysql>create database db_name;
mysql> use db_name;
mysql> source knit.sql;
mysql -u username -p password db_name < knit.sql
mysql -p -u [user] [database] < knit.sql
C:\> cmd.exe /c "mysql -u root -p db_name < knit.sql"
Replace NAME,USER,PASSWORD with your credentials
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'db_name',
'HOST': '127.0.0.1',
'PORT': '3306',
'USER': 'username',
'PASSWORD': 'password',
}}
Replace s3,object key name, with your credentials
source env/bin/activate
python3 manage.py runserver