Run this command in sail project folder:
docker-compose exec mysql bash
execute the mysql -u root -p
command
provide the default password password
then executes
# May be any user created with sail docker-compose
#
GRANT ALL PRIVILEGES ON *.* TO '<sail-user-from-docker-compose-yml>'@'%';
and
FLUSH PRIVILEGES;
that`s it!
My DB_USERNAME is "adam" and I can login with this user in mysql workbench (not with root). And this is also the sail user of docker-compose, right?
So when I login with "adam" in the container
mysql -u adam -p
they try to give me all PRIVILEGES then this is denied:Am I missing something?