Reputation: 3216
I am new to both django and mysql, I am given a mysql dump file that will be used in a django app. I created a new database and restored the dump file into that using mysqldump. Now I am lost about how to use both of them together. Please help.
Upvotes: 1
Views: 423
Reputation: 679
Assuming that you have restored the dump on to your database.
Make django migrations
python manage.py makemigrations
Fake the migrations
python manage.py migrate --fake
Run the app
python manage.py runserver
On a side note, you can check if you have database credentials on in your settings.py of your application
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'mydatabase',
'USER': 'mydatabaseuser',
'PASSWORD': 'mypassword',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
Upvotes: 1