P
P
Pan Propan2016-02-14 22:57:03
MySQL
Pan Propan, 2016-02-14 22:57:03

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

2 answer(s)
I
IceJOKER, 2016-02-14
@IceJOKER

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

B
borodka_lenina, 2016-02-15
@borodka_lenina

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 question

Ask a Question

731 491 924 answers to any question