File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ postgresql server yaratish va sozlash
2
+
3
+
4
+ db o'rniga o'zizi database nomini qo'yasiz.
5
+ user o'rniga kerakli username.
6
+ passwordni ham o'zizga moslab olasiz!
7
+
8
+
9
+ sudo apt update
10
+ sudo apt list --upgradable
11
+ sudo apt upgrade -y
12
+ sudo apt install libpq-dev postgresql postgresql-contrib -y
13
+ sudo -i -u postgres psql
14
+
15
+ CREATE DATABASE db;
16
+ CREATE USER user WITH PASSWORD 'pass';
17
+ ALTER ROLE user SET client_encoding TO 'utf8';
18
+ ALTER ROLE user SET default_transaction_isolation TO 'read committed';
19
+ ALTER ROLE user SET timezone TO 'UTC';
20
+ GRANT ALL PRIVILEGES ON DATABASE db TO user;
21
+
22
+ \l
23
+
24
+ GRANT ALL PRIVILEGES ON SCHEMA public TO user;
25
+ ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO user;
26
+ \q
You can’t perform that action at this time.
0 commit comments