postgresql服务器启动和数据库的建立
2007-08-05 13:37
555 查看
Windows环境下使用postgresql:
遇到的问题;
1:initdb建立数据簇后,需先启动数据库服务器,否则会出现下列错误:
psql:无法连接到服务器: Connection refused(0x0000274D/10061)
服务器是否在主机“???”上运行并且准备接受在端口5432上的TCP/IP联接?
更正方法:启动数据库服务器:"postgres" -D "data" 或 "pg_ctl" -D "data" -logfile start
2:启动服务器后,在另外一个命令行窗口中建立数据库:create mydb
错误提示:createdb:无法连接到数据库postgres :FATAL: missing or erroneous pg_hba.conf file
log details: role "Localhost" does not exist
更正方法:指定超级用户名:createdb -U postgres -W mydb
最终正确操作过程:
1. 安装postgresql ,版本:postgresql-8.2.4-1-binaries-no-installer.zip--
http://wwwmaster.postgresql.org/redir?setmir=226&typ=h&url=http://ftp2.au.postgresql.org/pub/postgresql//binary/v8.2.4/win32/postgresql-8.2.4-1-binaries-no-installer.zip
2. 安装补丁:postgres_win32_patch.rar:http://bbs.pgsqldb.com/index.php?t=getfile&id=3725&rid=&S=7b0e2fdbb539b0485edadd37144c5e45
3.设置系统环境变量,如:c:/pgsql/data;c:/pgsql/bin;c:/pgsql/lib:
4.建立数据簇:initdb -U postgres -W -D %postgresql install path%/ data
5.启动数据库服务器:"postgres" -D "data" 或 "pg_ctl" -D "data" -logfile start
6.建立数据库:createdb -U postgres -W mydb,
或者:
psql -U postgres;
create database kantoo
遇到的问题;
1:initdb建立数据簇后,需先启动数据库服务器,否则会出现下列错误:
psql:无法连接到服务器: Connection refused(0x0000274D/10061)
服务器是否在主机“???”上运行并且准备接受在端口5432上的TCP/IP联接?
更正方法:启动数据库服务器:"postgres" -D "data" 或 "pg_ctl" -D "data" -logfile start
2:启动服务器后,在另外一个命令行窗口中建立数据库:create mydb
错误提示:createdb:无法连接到数据库postgres :FATAL: missing or erroneous pg_hba.conf file
log details: role "Localhost" does not exist
更正方法:指定超级用户名:createdb -U postgres -W mydb
最终正确操作过程:
1. 安装postgresql ,版本:postgresql-8.2.4-1-binaries-no-installer.zip--
http://wwwmaster.postgresql.org/redir?setmir=226&typ=h&url=http://ftp2.au.postgresql.org/pub/postgresql//binary/v8.2.4/win32/postgresql-8.2.4-1-binaries-no-installer.zip
2. 安装补丁:postgres_win32_patch.rar:http://bbs.pgsqldb.com/index.php?t=getfile&id=3725&rid=&S=7b0e2fdbb539b0485edadd37144c5e45
3.设置系统环境变量,如:c:/pgsql/data;c:/pgsql/bin;c:/pgsql/lib:
4.建立数据簇:initdb -U postgres -W -D %postgresql install path%/ data
5.启动数据库服务器:"postgres" -D "data" 或 "pg_ctl" -D "data" -logfile start
6.建立数据库:createdb -U postgres -W mydb,
或者:
psql -U postgres;
create database kantoo
相关文章推荐
- 建立从SQL Server 到 DB2 数据库链接服务器
- 系统内核参数有问题导致postgresql数据库无法启动
- Linux下Oracle启动、建立表空间、用户、授权、数据库导入导出
- PostgreSQL在非默认的路径下创建表空间及数据库后,删除数据库目录后,还需要删除pg_tblspc下的链接文件,否则尝试启动其他实例时会报错
- Postgresql 数据目录data目录权限过大引起的数据库无法启动
- Report Server Windows Service (MSSQLSERVER) 无法与报表服务器数据库建立连接
- 数据库连接问题——服务器启动不了
- mini6410基于linux2.6.36内核通过NFS启动根文件系统总结(一搭建开发环境——建立NFS服务器)
- (转)Linux下Oracle启动、建立表空间、用户、授权、数据库导入导出
- oracle监听,数据库,oracle服务器的启动和停用
- 翻译brent ozar的sqlserver dba训练课程——第一章:建立数据库服务器清单
- PostgreSQL服务器启动和关闭方法介绍
- ArcGis Server 无法启动或无法建立到 localhost:6080 服务器的连接
- SQL Server 2005 不允许远程连接解决方法、数据库引擎启动服务器的方法
- Report Server Windows Service (MSSQLSERVER) 无法与报表服务器数据库建立连接
- PostgreSQL服务过程中的那些事一:启动postgres服务进程二:建立连接完成
- 用django建立个人博客,启动命令及数据库命令
- (转载)表服务器无法打开与报表服务器数据库的连接。所有请求和处理都要求与数据库建立连接。
- mini6410基于linux2.6.36内核通过NFS启动根文件系统总结(一搭建开发环境——建立NFS服务器)
- mini6410基于linux2.6.36内核通过NFS启动根文件系统总结(一搭建开发环境——建立NFS服务器)