Answer the question
In order to leave comments, you need to log in
How to properly grant rights to the MySQL database to the user?
On the hosting https://www.pythonanywhere.com I want to make a test site. Created a Mysql database from a panel.
Throws a bunch of errors
when trying .
python manage.py migrate
django.db.utils.OperationalError: (1044, "Access denied for user 'tabarigen'@'%' to database 'stomcrm'")
Answer the question
In order to leave comments, you need to log in
You give the necessary rights to this or that user, what a stupid question?
Which commands you want to allow this or that, you give rights to such and that's all
Depending on what the user needs.
If reading, then SELECT, if adding rows, then INSERT. If the user is alone and too lazy to bother with the rights, then ALL PRIVILEGES (but this is a so-so option)
grant ALL PRIVILEGES on * . * to 'tabarigen'@'%' identefied by 'password';
Here you can read more in detail:
www.mysql.ru/docs/man/GRANT.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question