mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 02:04:03 +00:00
fixed issues in sail.blade.md
This commit is contained in:
parent
6e72849a04
commit
54a8a264a6
1 changed files with 1 additions and 16 deletions
|
|
@ -9,7 +9,7 @@ section: content
|
|||
## Creating tenants
|
||||
|
||||
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 `*`;
|
||||
In order to create, read, update and delete operations 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 statements
|
||||
|
||||
|
|
@ -17,18 +17,3 @@ To do so either login to the mysql shell or via any client using root user crede
|
|||
GRANT ALL PRIVILEGES on *.* to 'sail'@'%';
|
||||
FLUSH PRIVILEGES;
|
||||
```
|
||||
|
||||
### Specifying Database Credentials {#specifying-database-credentials}
|
||||
|
||||
While working with sail, it offers a database user `sail` which just have the privileges for just the one database created at the inception of the project (central database in our tenancy case). This user does not have the privileges to create new users or `GRANT OPTION` privilege, which is used to grant permissions to other users.
|
||||
|
||||
If you want to use custom users (one user for each respective database), you will need `GRANT OPTION` grant on your central database user (`sail` in this case), otherwise you cannot grant permissions to the newly created user and will result in an error.
|
||||
|
||||
To avoid this failure, run the following SQL from root user:
|
||||
|
||||
```sql
|
||||
GRANT GRANT OPTION on central_database.* to 'sail'@'%';
|
||||
FLUSH PRIVILEGES;
|
||||
```
|
||||
|
||||
*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