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
Asked
Active
Viewed 53 times
0
-
Please provide enough code so others can better understand or reproduce the problem. – Community Mar 05 '22 at 22:08
1 Answers
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
-
yeah, I have tried with MYSQL workbench also but while creating new database , I m getting the below error, please suggest how to fix this error: – Amrapali Kumari Feb 25 '22 at 13:00
-
-
@Amrapali Kumari try this solution: https://stackoverflow.com/questions/25777943/failed-to-connect-to-mysql-at-127-0-0-13306-with-user-root-access-denied-for-us – Darsh Modi Feb 25 '22 at 13:28