[GH-ISSUE #169] Migrate from sqlite3.db to MySQL or MariaDB server? (maybe postgresql also) #116

Closed
opened 2026-02-27 15:57:23 +03:00 by kerem · 2 comments
Owner

Originally created by @lord-kyron on GitHub (Aug 2, 2018).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/169

@retspen @catborise @honza801 - can the application be modified to use some other SQL DB service apart from SQLite3? I want to use it with MariaDB 10 for example and have redundant DBs and replica tion in case of failure, etc.?

Originally created by @lord-kyron on GitHub (Aug 2, 2018). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/169 @retspen @catborise @honza801 - can the application be modified to use some other SQL DB service apart from SQLite3? I want to use it with MariaDB 10 for example and have redundant DBs and replica tion in case of failure, etc.?
kerem closed this issue 2026-02-27 15:57:23 +03:00
Author
Owner

@catborise commented on GitHub (Aug 3, 2018):

hi bandic db contains trivial information and too small for real db, i think.
but if it is "must" for you. changing database is very simple operation for django.

in settings.conf, there is a databases section. you can change it whatever you want.

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}

change to:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'myproject',
'USER': 'myprojectuser',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '',
}
}

for detailed explanation you can check;
https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-django-application-on-ubuntu-14-04

for other examples google it...

<!-- gh-comment-id:410157329 --> @catborise commented on GitHub (Aug 3, 2018): hi bandic db contains trivial information and too small for real db, i think. but if it is "must" for you. changing database is very simple operation for django. in settings.conf, there is a databases section. you can change it whatever you want. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } change to: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'myproject', 'USER': 'myprojectuser', 'PASSWORD': 'password', 'HOST': 'localhost', 'PORT': '', } } for detailed explanation you can check; https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-django-application-on-ubuntu-14-04 for other examples google it...
Author
Owner

@lord-kyron commented on GitHub (Aug 3, 2018):

Thank you!

<!-- gh-comment-id:410190992 --> @lord-kyron commented on GitHub (Aug 3, 2018): Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#116
No description provided.