Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manually configure and start PostgreSQL on windows?

I have application that use mysql database, but now i need to port it to postgres... In my current installation i have embedded mySQL binaries, and i manually change my.ini file to change default location of mysql server to apppath, install mySQL service and start it... Is this possible (and how) in PostgreSQL?

Thanks in advance

like image 217
onedevteam.com Avatar asked May 04 '11 10:05

onedevteam.com


People also ask

How do I start PostgreSQL in Shell?

Getting a PostgreSQL command prompt You can get a command shell in Windows by running cmd.exe. The CSEP544 shell launcher script will also open a shell for you. Type psql -U postgres at the prompt, and hit Enter. Here, postgres represents the username of the database superuser.

How do I open port 5432 in Windows?

As an alternative you can go to Control Panel -> Systems and Security -> Windows Firewall -> Allow a program or feature through Windows Firewall -> Advanced Settings -> New Rule: Rule Type: Port. TCP or UDP: TCP. Specific local ports: 5432.


1 Answers

use pgsql bundle zip so u know actual path that not requires installation

initialize database

initdb.exe <datafolderpath>

init.db & pg_ctl is under

pgsql/bin

start database

"pg_ctl" -D "<datafolderpath>" -l logfile start
like image 166
Nirmal- thInk beYond Avatar answered Sep 29 '22 12:09

Nirmal- thInk beYond