# pgAdmin
IP: http://10.0.2.15:8000
username: admin@abb.com
password: .edge
# postgresql
database: postgres
username: postgres
password: .edge
psql -h 10.0.2.15 -U postgres
psql -h 10.0.2.15 -U postgres smartot4
\q
sudo apt install postgresql
#
# Setup the repository
#
# Install the public key for the repository (if not done previously):
sudo apt install curl
sudo curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
# Create the repository configuration file:
sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
#
# Install pgAdmin
#
# Install for both desktop and web modes:
sudo apt install pgadmin4
# Install for desktop mode only:
sudo apt install pgadmin4-desktop
# Install for web mode only:
sudo apt install pgadmin4-web
# Configure the webserver, if you installed pgadmin4-web:
sudo /usr/pgadmin4/bin/setup-web.sh
# 注意不是https
http://127.0.0.1/pgadmin4
sudo docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=Quarter0 -d postgres
#Host: 172.17.0.1
sudo docker pull dpage/pgadmin4
sudo docker run -d -p 5433:80 --name pgadmin4 -e PGADMIN_DEFAULT_EMAIL=michael-weijin.zhu@cn.abb.com -e PGADMIN_DEFAULT_PASSWORD=.michael dpage/pgadmin4
http://127.0.0.1:5433
char:固定长度字符串,pgadmin中无法修改此类型的长度,默认长度为1.
char[]:固定长度字符串,用来存储数组类型的数据,pgadmin中无法修改此类型的长度,默认长度为1.
character:固定长度字符串,pgadmin中可以修改此类型的长度
character[]:固定长度字符串,用来存储数组类型的数据,pgadmin中可以修改此类型的长度
!通过以下代码可以查询到数据库对应的文件夹名称
show data_directory;
select * from pg_database; ![日志文件夹](/assets/smartot/pg_database.png) ![日志文件夹](/assets/smartot/pg_database_file.png)