postgrel 數據庫之命令


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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM