0

Well, I'm trying to connect MYSQL database to Django , I have installed mysql installer 8.0 version, after installation in the Accounts and Roles section its not taking root account password and also I m not getting to change the password option, please help if anyone faced the same problem , let me know if any solution for this . How do I change the MYSQL root account password

1 Answers1

0

You can use the MySQL workbench for GUI and you just have to create a new database in it after that, find the settings in your project's settings.py file and change to this,

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'YOUR_DB_NAME',
        'USER': 'YOUR_USERNAME',
        'PASSWORD': 'YOUR_DB_PASSWORD',
        'HOST': 'localhost',
        'PORT': 3306
    }
}

and run this :

pip install mysqlclient

Darsh Modi
  • 289
  • 1
  • 9