I’ve seen many threads and solutions but none have worked for me. I’m trying to run migrations on my django project via Mac. After running python manage.py makemigrations
, I get this return stack
line 150, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, "Access denied for user 'Mikael'@'localhost' (using password: NO)")
It made sense that I don’t have permissions for my database, so I went ahead and granted privileges for the user stated above (‘Mikael’@’localhost’) via terminal. To do so, I logged into the root user to grant privileges to ‘Mikael’.
mysql -u root -p
Then granted all privileges for the user
grant all privileges on *.* to 'Mikael'@'localhost' WITH grant option;
Yet I’m still getting access denied. If it weren’t clear through the initial error (in title), I’m using pymysql. I’ve also granted privileges in user: ‘Mikael’
Mikael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.