Skip to content

Instantly share code, notes, and snippets.

@akatche
Forked from jjsquady/mysql-sail.md
Created July 5, 2022 14:26
Show Gist options
  • Save akatche/f553dcae9043da25791107689d2d8603 to your computer and use it in GitHub Desktop.
Save akatche/f553dcae9043da25791107689d2d8603 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