Skip to content

Instantly share code, notes, and snippets.

@pastacolsugo
Forked from jjcodes78/mysql-sail.md
Created April 18, 2023 15:04
Show Gist options
  • Save pastacolsugo/87d37a4619aefe3b01e9551864285d43 to your computer and use it in GitHub Desktop.
Save pastacolsugo/87d37a4619aefe3b01e9551864285d43 to your computer and use it in GitHub Desktop.
Laravel Sail - GRANT ALL PRIVILEGES to user

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment