SitePoint Sponsor |
|
User Tag List
Results 1 to 15 of 15
Thread: PostgreSQL on WinMe
-
Sep 2, 2001, 05:38 #1
PostgreSQL on WinMe
I am posting this here because I think that there are people in this forum (freddy and freakysid) that can help more than in the general computer probs forum.
I am using Cygwin which is a Unix emulator for Windows. It allows you to run *nix programs and commands. I have got PostgreSQL and CygIPC. The instructions have the following commands:
1) Start the cygipc ipc-daemon :
ipc-daemon &
2) Initialize PostgreSQL:
initdb -D /usr/share/postgresql/data
3) Start the PostgreSQL postmaster:
postmaster -D /usr/share/postgresql/data &
4) Connect to PostgreSQL:
psql template1
Ok, so I do all of this and everything seems to go fine. When I run command 4 to start PostgreSQL I get a screen saying:
Welcome to psql, the PostgreSQL interactive terminal.
So, everything seems to be running fine, if I press ctrl+alt+del PostgreSQL is running.
Now the questions:
1) How do I connect to it through PHP?
2) It told me that the username would be default, is that the username I use when conecting ?
3) How do I stop it running?
4) How do I start it again in future?
Thanks for any help
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Sep 3, 2001, 12:21 #2
Anyone?
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Sep 3, 2001, 12:54 #3
- Join Date
- Jul 1999
- Location
- Chicago
- Posts
- 2,629
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
To stop it, just kill its process. I don't really know of a better way but I'm sure the readmes have something about it.
To start it again, run the postmaster daemon.
To connect to it in PHP, use pg_connect - http://php.net/manual/en/function.pg-connect.php.
To create a user, login as root and run the create user command. Then use that username to connect with PHP.
-
Sep 3, 2001, 13:12 #4Originally posted by qslack
To start it again, run the postmaster daemon.
postmaster -D /usr/share/postgresql/data &
psql template1
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Sep 3, 2001, 13:19 #5
Scrap the last question I tried it and it works fine.
After I get it running how do I type commands? The prompt looks like this:
template1-#
But, it wont let me run commands from here
Any ideas?
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Sep 4, 2001, 12:52 #6
Sorted now!
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Sep 4, 2001, 13:26 #7
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sean I am right where you are right now. So were you able to connect to the postgres server using PHP? How did you create a table to play with?
Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Sep 4, 2001, 13:37 #8
Yes I have been able to connect with PHP through http://www.greatbridge.org/project/p...rojdisplay.php
This is phpMyAdmin but for PostgreSQL. This is what I used to create a table becasue I could not figure it out by the command line as it kept giving me errors.
Make sure you create a user for yourself that has permission to create databases:
CREATE USER sean WITH PASSWORD 'sean' CREATEDB;
I have been playing with this all day (day off work) so I might be able to answer some questions
BTW Freddy have you worked out how to shut PostgreSQL down properly?
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Sep 4, 2001, 13:42 #9
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I plan on spending sometime with it tonight. BTW did you compile your own Postgres or get a hold ofa binary. I could never get the make to go correctly. But I had a binary of 7.0 laying around.
Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Sep 4, 2001, 13:45 #10
I used cygwin (http://cygwin.com) the win version of PostgreSQL is only for NT
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Sep 4, 2001, 13:47 #11
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes I have cygwin as well. My question is did you actually build postgres from the source or did you copy a binary into your cygwin /usr/local/ folder?
Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Sep 4, 2001, 13:50 #12
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Basically I am in the same spot as you I can run postmaster from the cygwin command line and see dataabses, but my question is how you got to htis point I wanted to see how it differed from how I got here.
Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Sep 4, 2001, 13:53 #13
Sorry, completely missed your question then!
I grabbed the latest version of Cygwin including the PostgreSQL binary. I don't think you can compile it yourself because Cygwin lacks certain commands and that's why you have to use Cygipc as well to run PostgreSQL.
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Sep 4, 2001, 13:57 #14
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
So where did you get the latest postgres binary again, I only could find 7.0
Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Sep 4, 2001, 14:01 #15
When you run setup you can click on the version number next to the name to select which you want. I just looked at PG_VERSION and I have got 7.1
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
Bookmarks