File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ ** Connect database container**
2
+ ```
3
+ docker exec -it postgres psql -U postgres
4
+ [sakhtar@linux docker-compose-postgres]$ docker exec -it postgres psql -U postgres
5
+ psql (12.4)
6
+ Type "help" for help.
7
+
8
+ postgres=#
9
+ ```
10
+
11
+ ** List Database**
12
+ ```
13
+ postgres=# \l
14
+ List of databases
15
+ Name | Owner | Encoding | Collate | Ctype | Access privileges
16
+ -----------+----------+----------+------------+------------+-----------------------
17
+ postgres | postgres | UTF8 | en_US.utf8 | en_US.utf8 |
18
+ shamim | postgres | UTF8 | en_US.utf8 | en_US.utf8 |
19
+ template0 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres +
20
+ | | | | | postgres=CTc/postgres
21
+ template1 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres +
22
+ | | | | | postgres=CTc/postgres
23
+ (4 rows)
24
+
25
+ postgres=#
26
+
27
+ ```
You can’t perform that action at this time.
0 commit comments