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
Search for ** MySQL Database ** from ** [New] ** on the Azure portal, select ** MySQL Database ** at the top, and create a MySQL database.
Select ** [Properties] ** from the created database and copy the ** connection string **
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': '',
}
}
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!
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