Answer the question
In order to leave comments, you need to log in
How to change database permissions correctly?
Installed mysql from sudo (is that right?) and now I don't know how to allow user to connect to it.
What and how to do so that the user can interact with mysql?
UPD:
Not even that... I can connect if I write like below. mysql -u user -p
If I want to connect to a specific database, as below, then an error appears.mysql -u user -p some_db
ERROR 1044 (42000): Access denied for user 'user'@'localhost' to database 'some_db'
sudo mysql -u superuser -p some_db
Answer the question
In order to leave comments, you need to log in
mysql> create database testbase; #create mysql database
> GRANT ALL PRIVILEGES ON testbase.* TO [email protected] IDENTIFIED BY 'pass'; #Give access to the user
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question