Skip to content

Instantly share code, notes, and snippets.

@jjsquady
Last active March 9, 2024 16:50
Show Gist options
  • Star 40 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save jjsquady/e12ce89c9029d520ce08f60a9ff8f304 to your computer and use it in GitHub Desktop.
Save jjsquady/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!

@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