备份:
pg_dump -h localhost -U jian24 -p 5432 merchant >./dump.sql
恢复:
psql -U jian24 -h 127.0.0.1 -p 5432 -d merchant -f dump.sql
登录pg客户端
psql -U postgres -h 127.0.0.1 -p 5432
输入密码即可
mac下启动与暂停
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
pg_ctl -D /usr/local/var/postgres stop
网友评论