网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

如何新增和删除postgres数据库

时间:2024-11-04 23:43:40

1、打开终端窗口。

如何新增和删除postgres数据库

2、sudo su postgres,这样我们就能进入这个postgres用户。

如何新增和删除postgres数据库

3、输入psql --version可以查看版本。

如何新增和删除postgres数据库

4、psql -l,可以查看数据库列表。

如何新增和删除postgres数据库如何新增和删除postgres数据库

5、这个时候创建一个不重名的数据库,createdb test。

如何新增和删除postgres数据库如何新增和删除postgres数据库

6、psql test就能进入test数据库,输入help可以查看有什么指令帮助。

如何新增和删除postgres数据库如何新增和删除postgres数据库如何新增和删除postgres数据库如何新增和删除postgres数据库如何新增和删除postgres数据库

7、dropdb test就是删除数据库。

如何新增和删除postgres数据库如何新增和删除postgres数据库如何新增和删除postgres数据库
© 2025 小知经验
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com