L
L
Lev K2017-10-03 21:13:22
MySQL
Lev K, 2017-10-03 21:13:22

Why can't vagrant give normal permissions to Mysql users?

in vagrant config:

mysql -uroot <<< "CREATE USER 'user'@'%' IDENTIFIED BY '12345'"
mysql -uroot <<< "CREATE USER 'user'@'localhost' IDENTIFIED BY '12345'"
mysql -uroot <<< "GRANT ALL PRIVILEGES ON *.* TO 'user'@'%'"
mysql -uroot <<< "GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost'"
mysql -uroot <<< "FLUSH PRIVILEGES"

But the user with the USAGE rights is created. Why is that ? Well, at least the password is suitable, otherwise I read that some people don’t set a password with such a thing.
PS I added localhost for verification, then it will not be needed, as I understand it. But both have the same rights, I look like this:
SHOW GRANTS FOR 'user'@'localhost';

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question