mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 18:24:03 +00:00
Update the Sail integration guide
This commit is contained in:
parent
fc66b6f2cd
commit
8a0543a78e
1 changed files with 6 additions and 2 deletions
|
|
@ -6,9 +6,13 @@ section: content
|
||||||
|
|
||||||
# Laravel Sail {#sail}
|
# Laravel Sail {#sail}
|
||||||
|
|
||||||
Sail can only perform the create, read, update and delete operations in the central database by default. To give Sail permission to also perform these operations in tenant databases, log in to Sail's MySQL shell as the root user (`docker-compose exec mysql bash`, then `mysql -u root -p` – by default, the password is `password`) and grant the `sail` user access to all databases by running the following statements:
|
> Note: This guide covers Sail integration using MySQL. The steps described in the guide will need adjustments if you're using a database other than MySQL.
|
||||||
|
|
||||||
```bash
|
> The default Sail user's name is determined by the `DB_USERNAME` variable in your `.env`. For this guide, we'll be using the username `sail`.
|
||||||
|
|
||||||
|
The default Sail user can only perform the create, read, update and delete operations in the central database. To allow the user to perform these operations in the tenant databases too, log in to Sail's MySQL shell as the root user (`docker-compose exec mysql bash`, then `mysql -u root -p` – by default, the password is determined by the `DB_PASSWORD` variable in your `.env`) and grant the Sail user access to all databases by running the following statements:
|
||||||
|
|
||||||
|
```sh
|
||||||
GRANT ALL PRIVILEGES on *.* to 'sail'@'%';
|
GRANT ALL PRIVILEGES on *.* to 'sail'@'%';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue