Azure External Storage MySQL Challenges with Django (PTVS)

I tried with MySQL but couldn't

First of all, from the conclusion, there was an article about using MySQL of Azure for external storage, so I tried it, but I could not do it. Here

MySQL settings on the Azure side

Search for ** MySQL Database ** from ** [New] ** on the Azure portal, select ** MySQL Database ** at the top, and create a MySQL database. 1.png

Select ** [Properties] ** from the created database and copy the ** connection string ** 3.png

I have a app that I use a lot, but it doesn't work even if I rewrite the settings.py of the app as set.

settings.py


#Database=<NAME>;Data Source=<HOST>;User Id=<USER>;Password=<PASSWORD>
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': '<NAME>',
        'USER': '<USER>',
        'PASSWORD': '<PASSWORD>',
        'HOST': '<HOST>',
        'PORT': '',
    }
}

Contents of Error

Maybe it won't find the location of the database because it will result in a ProgrammingError. It is useless even if Migrate and Migrations are used!

After execution


ProgrammingError at /
(1146, "Table 'testdatabase1919.app_check_list' doesn't exist")

I wondered what happened, but I thought it was because the version of Django was not good ** Django 1.8 ▶ ︎Django 1.10 **

When you run

Manage.py


 ImproperlyConfigured:
 execute_from_command_line(sys.argv)

The error was thrown out, and the error in the ** execute_from_command_line ** part could not be resolved and the app did not run in the first place. (Same for 1.9)

After all, I tried various things and it didn't work, so I gave up!

At the end

Can anyone please tell me how to do it with ** MySQL **! SQLite is ready!

For the time being, I found it safer and easier to deploy on Azure using the default SQLite!

Recommended Posts

Azure External Storage MySQL Challenges with Django (PTVS)
Azure table storage with PTVS Flask app
Use MySQL with Django
How to use Azure Table storage from Django (PTVS)
Deploy a Django app made with PTVS on Azure
Use Unicode 6.0 emoji with django / MySQL
Create and deploy a Django (PTVS) app using Azure Table storage
Browse an existing external database with Django
Application development using SQLite with Django (PTVS)
Django with Python Tools 2.2 for Visual Studio (PTVS 2.2)
Use Python / Django with Windows Azure Cloud Service!
[Azure Functions / Python] Chain functions with Queue Storage binding
Internationalization with django
CRUD with Django
Django + MySQL settings
Storage I / O notes in Python with Azure Functions