Steps to migrate Django Sqllite DB to MySql DB
1. python manage.py dumpdata -o datadump.json
2. Change settings.py to your mysql
4. python manage.py migrate --run-syncdb5. python manage.py loaddata datadump.json
2. Change settings.py to your mysql
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'database', 'USER': 'username', 'PASSWORD': 'password', 'HOST': 'localhost', # Or an IP Address that your DB is hosted on 'PORT': '3306', } }
3. Check you have mysqlclient, else run below command:
pip install mysqlclient
4. python manage.py migrate --run-syncdb5. python manage.py loaddata datadump.json