Hi friends, I’m trying to connect Django with MySQL on Ubuntu.
I got this error with vsCode and also on the terminal: oluola@DrOluyemi:~$ mysql
ERROR 1045 (28000): Access denied for user ‘oluola’@‘localhost’ (using password: NO)
But if I run this code on the terminal it works: oluola@DrOluyemi:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.32-0buntu0.22.04.1 (Ubuntu)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>
Pls. you have any idea how I can resolve it?
I appreciate you in advance
here is the database config:
DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘showroom’,
‘HOST’: ‘localhost’,
‘USER’: ‘root’,
‘PASSWORD’: ‘************’
}
}