docs: create postgres
This commit is contained in:
parent
2c33dfaf17
commit
76f5b7438a
26
postgres.md
Normal file
26
postgres.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
title: Postgres
|
||||
description:
|
||||
published: true
|
||||
date: 2019-10-09T09:05:14.198Z
|
||||
tags:
|
||||
---
|
||||
|
||||
# Postgres
|
||||
|
||||
|
||||
[Create new user](https://www.a2hosting.com/kb/developer-corner/postgresql/managing-postgresql-databases-and-users-from-the-command-line)
|
||||
|
||||
* At the command line, type the following command as the server's root user:
|
||||
`su - postgres`
|
||||
* You can now run commands as the PostgreSQL superuser. To create a user, type the following command:
|
||||
|
||||
`createuser --interactive --pwprompt`
|
||||
|
||||
* At the Enter name of role to add: prompt, type the user's name.
|
||||
* At the Enter password for new role: prompt, type a password for the user.
|
||||
* At the Enter it again: prompt, retype the password.
|
||||
* At the Shall the new role be a superuser? prompt, type y if you want to grant superuser access. Otherwise, type n.
|
||||
* At the Shall the new role be allowed to create databases? prompt, type y if you want to allow the user to create new databases. Otherwise, type n.
|
||||
* At the Shall the new role be allowed to create more new roles? prompt, type y if you want to allow the user to create new users. Otherwise, type n.
|
||||
* PostgreSQL creates the user with the settings you specified.
|
||||
Loading…
x
Reference in New Issue
Block a user