一、psql命令
1、登录 以下用户名是postgres
psql -h 127.0.0.1 -p 7496 -U postgres
2、创建数据库
create database new_database owner postgres;
3、给用户grant权限
grant all privileges on all tables in schema public to postgres;
4、 备份数据库
5、还原数据库
psql -U postgres -d my_database -f backup_file.sql