Skip to content

Instantly share code, notes, and snippets.

@jjcodes78
Last active March 9, 2024 16:50
Show Gist options
  • Save jjcodes78/e12ce89c9029d520ce08f60a9ff8f304 to your computer and use it in GitHub Desktop.
Save jjcodes78/e12ce89c9029d520ce08f60a9ff8f304 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!

@AtlasApollo
Copy link

Thank you very much!

@bulentAkgul
Copy link

I can't thanks enough.

@fumfel20
Copy link

You made my day! Thanks

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