mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
wip
This commit is contained in:
parent
f1bae7e14e
commit
6e72849a04
2 changed files with 5 additions and 4 deletions
|
|
@ -61,7 +61,7 @@ This config array lets you enable, disable or add your own [tenancy bootstrapper
|
||||||
|
|
||||||
### Database {#database}
|
### Database {#database}
|
||||||
|
|
||||||
>If you're using Laravel Sail, please refer the [Laravel Sail integration guide]({{ $page->link('integrations/sail') }}):
|
*If you're using Laravel Sail, please refer the [Laravel Sail integration guide]({{ $page->link('integrations/sail') }}).*
|
||||||
|
|
||||||
This section is relevant to the multi-database tenancy, specifically, to the `DatabaseTenancyBootstrapper` and logic that manages tenant databases.
|
This section is relevant to the multi-database tenancy, specifically, to the `DatabaseTenancyBootstrapper` and logic that manages tenant databases.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,10 @@ section: content
|
||||||
|
|
||||||
## Creating tenants
|
## Creating tenants
|
||||||
|
|
||||||
Before creating any tenants you have to ensure that the `sail` user has the necessary permissions.
|
By default sail has the `ALL` privilege on the default database (here it is the central database).
|
||||||
|
In order to create, read, update and delete opreations related to the database, we will assign `ALL` privilege on all databases via the wildcard `*`;
|
||||||
|
|
||||||
To do so either login to the mysql shell or via any client using root user credentials and run the following queries:
|
To do so either login to the mysql shell or via any client using root user credentials and run the following statements
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
GRANT ALL PRIVILEGES on *.* to 'sail'@'%';
|
GRANT ALL PRIVILEGES on *.* to 'sail'@'%';
|
||||||
|
|
@ -30,4 +31,4 @@ GRANT GRANT OPTION on central_database.* to 'sail'@'%';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
```
|
```
|
||||||
|
|
||||||
>For more info see [Specifying Database Credentials]({{ $page->link('customizing-databases#specifying-database-credentials') }})
|
*For more info see [Specifying Database Credentials]({{ $page->link('customizing-databases#specifying-database-credentials') }})*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue