psql -d【登录连接的数据库】 -U 用户名 -p 端口 -h 地址 默认为本地 psql -h hostnameOrIp -p 端口 dbname username 连接参数可以用环境变量指定 export PGDATABASE=testdb export PGHOST=115.159.35.63 export PGPORT=5432 export PGUSER=posrgres psql -l 查看有哪些数据库 进入后 \l 查看有哪些数据...