Skip to content

Instantly share code, notes, and snippets.

@francosalcedo
Forked from jjsquady/mysql-sail.md
Created September 1, 2023 17:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save francosalcedo/300d3de3b88559f3863448d5b1bf2bb7 to your computer and use it in GitHub Desktop.
Save francosalcedo/300d3de3b88559f3863448d5b1bf2bb7 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