Skip to main content

Posts

Showing posts with the label MySQL

How to connect django project with Mysql database

This article will guide you through the set up process of the Django project  with connections to a MySQL database.So that app's installed on this project they can use MySQL database instead of the default sqlite3 database. Prerequisites:   You must have python installed within you environment,  MySQL must be installed and running With the prerequisites taken care off and our Django development environment set up, we can move on to integration/inner-workings. Step 1 You will need to navigate to where you want your django project to live cd  django mkdir django_projects cd django_projects python3 -m venv venv     # create Python virtual environment source venv/bin/activate  #  activate your Python virtual environment pip3 install Django #  install Django within the virtual environment django-admin startproject news_art # creates the project Note: Since Django creates extra directory I usually like to...