How to Connect Django with AWS RDS MySQL Database? Step by Step Guide| Kundan Kumar|

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • In this tutorial, I'll walk you through the process of connecting Django to an Amazon RDS MySQL database step by step. You'll learn how to set up your RDS instance, configure Django settings, and troubleshoot common issues along the way. By the end of this video, you'll have a fully functional Django application running on AWS RDS.
    1) Visit to Create an AWS RDS Instance: www.awa.amazon.com
    2) pip install mysqlclient
    2) To Configure Django Setting (fill with your credentials and endpoint/HOST):
    DATABASES = {
    'default': {
    'ENGINE': 'django.db.backends.mysql',
    'NAME': 'your_database_name',
    'USER': 'your_username',
    'PASSWORD': 'your_password',
    'HOST': 'your_rds_endpoint',
    'PORT': '3306', # Default MySQL port,
    'OPTIONS': {
    'charset': 'utf8mb4',
    'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
    },
    }
    }

Komentáře • 2

  • @vijaykumar-tv4oo
    @vijaykumar-tv4oo Před 3 měsíci +1

    Sir can you explain docker file for django to create an image

    • @kundankumar011
      @kundankumar011  Před 3 měsíci

      Thank you so much Vijay for watching this video and asking me to make video on Dockerfile in Django. Hope you managed to subscribe this channel so that you don't miss notifications on upload of new video on Dockerfile in Django