一、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