Connect to Database - MySQL (How does Django connect to MySQL/MariaDB database)

preview_player
Показать описание
MySQL is one of the most popular database. It is fast and reliable. It is easy to learn and administer. It uses Standard Structured Query Language(SQL).

MariaDB is just another implementation of MySQL

HOW TO INSTALL MYSQL

5. An installation of MariaDB server is already demonstrated in this video.

CONNECT MYSQL GRAPHICALLY

PACKAGE USED BY DJANGO TO CONNECT TO MYSQL

mysqlclient is the package required by Django to successfully connect to the MySQL server.

pip install mysqlclient

DATABASES = {
'default': {
'NAME': 'developerdemo',
'USER': 'developerdemo',
'PASSWORD': 'Demo650##',
'HOST': 'localhost',
'PORT' : '3306',
}
}
Рекомендации по теме
Комментарии
Автор

Thanks for the video. I got it to work just fine on my mac laptop with your help. :) One thing confused me. I connected my database to my online hosting provider for a website. Do I still need to make a local user in that case? Because in the online environment I also created user credentials.

Ithicuss