mirror of
https://codeberg.org/forgejo/docs.git
synced 2025-03-13 09:58:07 -04:00
admin:database-preparation: use different password from username in examples
This commit is contained in:
parent
314ca54b64
commit
ca28203c54
1 changed files with 6 additions and 6 deletions
|
@ -26,20 +26,20 @@ Note: All steps below requires that the database engine of your choice is instal
|
||||||
|
|
||||||
Enter the password as prompted.
|
Enter the password as prompted.
|
||||||
|
|
||||||
3. Create database user which will be used by Forgejo, authenticated by password. This example uses `'forgejo'` as password. Please use a secure password for your instance.
|
3. Create database user which will be used by Forgejo, authenticated by password. This example uses `'passw0rd'` as password. _Please use a secure password for your instance._
|
||||||
|
|
||||||
For local database:
|
For local database:
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
SET old_passwords=0;
|
SET old_passwords=0;
|
||||||
CREATE USER 'forgejo' IDENTIFIED BY 'forgejo';
|
CREATE USER 'forgejo' IDENTIFIED BY 'passw0rd';
|
||||||
```
|
```
|
||||||
|
|
||||||
For remote database:
|
For remote database:
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
SET old_passwords=0;
|
SET old_passwords=0;
|
||||||
CREATE USER 'forgejo'@'192.0.2.10' IDENTIFIED BY 'forgejo';
|
CREATE USER 'forgejo'@'192.0.2.10' IDENTIFIED BY 'passw0rd';
|
||||||
```
|
```
|
||||||
|
|
||||||
where `192.0.2.10` is the IP address of your Forgejo instance.
|
where `192.0.2.10` is the IP address of your Forgejo instance.
|
||||||
|
@ -104,10 +104,10 @@ Note: All steps below requires that the database engine of your choice is instal
|
||||||
su -c "psql" - postgres
|
su -c "psql" - postgres
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Create database user (role in PostgreSQL terms) with login privilege and password. Please use a secure, strong password instead of `'forgejo'` below:
|
4. Create database user (role in PostgreSQL terms) with login privilege and password. _Please use a secure, strong password instead of `'passw0rd'` below:_
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
CREATE ROLE forgejo WITH LOGIN PASSWORD 'forgejo';
|
CREATE ROLE forgejo WITH LOGIN PASSWORD 'passw0rd';
|
||||||
```
|
```
|
||||||
|
|
||||||
Replace username and password as appropriate.
|
Replace username and password as appropriate.
|
||||||
|
@ -274,7 +274,7 @@ In one-way TLS, the database client verifies the certificate sent from server du
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
DROP USER 'forgejo'@'192.0.2.10';
|
DROP USER 'forgejo'@'192.0.2.10';
|
||||||
CREATE USER 'forgejo'@'example.forgejo' IDENTIFIED BY 'forgejo' REQUIRE SSL;
|
CREATE USER 'forgejo'@'example.forgejo' IDENTIFIED BY 'passw0rd' REQUIRE SSL;
|
||||||
GRANT ALL PRIVILEGES ON forgejodb.* TO 'forgejo'@'example.forgejo';
|
GRANT ALL PRIVILEGES ON forgejodb.* TO 'forgejo'@'example.forgejo';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue