Home Database Mysql Tutorial 在windows sever2003安装postgresql9.1出现不能安装,安装后找不

在windows sever2003安装postgresql9.1出现不能安装,安装后找不

Jun 07, 2016 pm 02:59 PM
windows Install

在windows sever2003安装postgresql9.1出现不能安装,安装后找不到data文件夹解决办法 最近将写好的网站部署在windows sever2003服务器上,需要安装postgresql 9.1数据库,该安装文件在windowsxp上能正常安装,但是到服务器上就出现了问题。 主要有两个: 1.

在windows sever2003安装postgresql9.1出现不能安装,安装后找不到data文件夹解决办法

 

最近将写好的网站部署在windows sever2003服务器上,需要安装postgresql 9.1数据库,该安装文件在windowsxp上能正常安装,但是到服务器上就出现了问题。

 

主要有两个:

 

1.点击图标安装,系统提示缺少模块不能完成安装

 

解决方法:打开命令行,转换到安装文件所在的目录,执行  postgresqlXXXwindows.exe --install -runtimes 0 其中postgresqlXXXwindows.exe

 

2.安装后没有data文件夹,不能配置数据库。

 

解决方法:命令行转换到安装好的bin目录下执行  bin>initdb -D ‘databasename’ 来初始化数据库,此时默认用户名是主机用户名。

 

initdb中还有设置用户名的 -U 设置密码的-W超级用户的口令 等等。

 

执行完,就能在bin中看到创建的数据库和其中的data文件夹了,这时候就能配置数据库了。

 

3.更改密码:

 

pg_hba.conf中的加密方式设为trust

 

此时,不用密码就可以登录,select * from users 查询用户名, alter user XXX with password 'xxx'

 

再将pg_hba.conf中的加密方式设为md5,断开连接,重新登录,就需要输入密码了。

 

4.命令行启动数据库:

 

bin>pg_crl -D "xxx" start  输入用户民改密码就可以了。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What should I do if I can't delete a Windows system dll file? Tips for completely deleting stubborn dll files What should I do if I can't delete a Windows system dll file? Tips for completely deleting stubborn dll files Jun 12, 2024 pm 02:46 PM

What should I do if I can't delete a Windows system dll file? Tips for completely deleting stubborn dll files

Lossless Scaling on Steam Deck OLED runs games at up to 2x FPS Lossless Scaling on Steam Deck OLED runs games at up to 2x FPS Aug 26, 2024 am 10:07 AM

Lossless Scaling on Steam Deck OLED runs games at up to 2x FPS

How to turn off Security Center in Windows 11 How to turn off Security Center in Windows 11 Mar 28, 2024 am 10:21 AM

How to turn off Security Center in Windows 11

How to update the latest version of Bybit Exchange? Will there be any impact if it is not updated? How to update the latest version of Bybit Exchange? Will there be any impact if it is not updated? Feb 21, 2025 pm 10:54 PM

How to update the latest version of Bybit Exchange? Will there be any impact if it is not updated?

deepseek web version entrance deepseek official website entrance deepseek web version entrance deepseek official website entrance Feb 19, 2025 pm 04:54 PM

deepseek web version entrance deepseek official website entrance

How to install deepseek How to install deepseek Feb 19, 2025 pm 05:48 PM

How to install deepseek

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Mar 05, 2025 pm 05:57 PM

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node?

Snapdragon X Elite CPU performance nearly identical on battery vs AC power in Vivobook S15 benchmarks Snapdragon X Elite CPU performance nearly identical on battery vs AC power in Vivobook S15 benchmarks Jun 21, 2024 am 06:50 AM

Snapdragon X Elite CPU performance nearly identical on battery vs AC power in Vivobook S15 benchmarks

See all articles