You can create a database using the pgAdmin tool or Command Prompt.
The created database must have onlyoffice both for user and password.
Method 1
-
Run the
"%ProgramFiles%\PostgreSQL\12\pgAdmin 4\bin\pgAdmin4.exe" executable file.
-
In the pgAdmin window, connect to the PostgreSQL server and create a new login role named
onlyoffice with the onlyoffice password. To do that perform the following steps:
- Right-click on the Login/Group Roles item in the left-side menu and select Create -> Login/Group Role.
- In a new window that opens enter
onlyoffice in the Name field.
- Switch to the Definition tab and enter
onlyoffice in the Password field.
- Go to the Privileges tab and click on the Can login? switcher to set the Yes value.
- Click the Save button.
-
Create the
onlyoffice database, choosing the created login role onlyoffice as an owner.
To do that, right-click on the Databases item in the left-side menu, select Create -> Database.... In a new window that opens enter onlyoffice in the Database field and select the onlyoffice role in the Owner list, then click Save.
Method 2
Run the Command Prompt (press the win+r key combination, type in cmd and press Enter).
Consistently execute the following commands:
cd "%ProgramFiles%\PostgreSQL\12\bin"
psql -U postgres -c "CREATE USER onlyoffice WITH PASSWORD 'onlyoffice';"
psql -U postgres -c "CREATE DATABASE onlyoffice OWNER onlyoffice;"