Postgresql9.6基础使用(Windows 解压版)
下载压缩包:
Postgresql9.6:https://get.enterprisedb.com/postgresql/postgresql-9.6.2-1-windows-x64-binaries.zip
初始化数据库:
1、新建文件夹
mkdir {自定义目录}\data
2、初始化数据库文件
{Postgresql解压目录}\bin\initdb.exe -D {自定义目录}\data -E UTF8
启动、暂停、重启数据库:
{Postgresql解压目录}\bin\pg_ctl.exe -D {自定义目录}\data -l logfile start\stop\restart
创建用户和用户密码:
{Postgresql解压目录}\bin\createuser.exe -U 用户名 -P '密码'