aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/installation/db-setup.md
blob: 853146ac277fee6440db601bc9486aee47134e4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Database setup

By default the dev environment is set up with a Postgres database running on the host reachable as `db` from within the docker container where the code is running. In the setup screen, set the type to "PostgreSQL", leave the "Port" as 0, and set all the other fields to `db`,

The generated `.htconfig.php` file should contain the following after you're done:

```
$db_host = 'db';
$db_port = '0';
$db_user = 'db';
$db_pass = 'db';
$db_data = 'db';
$db_type = '1'; // an integer. 0 or unset for mysql, 1 for postgres
```

If you prefer to use MySQL or Mariadb as the database backend instead, you can change this by issuing the command:
```
% ddev config --database=mariadb:10.11
```

And then restart the environment by running `ddev restart`.