share database on USB drive - problem with Win 7

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

share database on USB drive - problem with Win 7

Postby scienziato » Tue Sep 07, 2010 4:30 am

I use regularly PT3 from 1 years on my desktop with Windows XP. From some days i bought a Win 7 Laptop and i though to share PT database on USB drive. I followed this method:

viewtopic.php?f=17&t=20345&p=96460&hilit=hotswap+drive#p96460

On my desktop it worked perfectly, but on laptop i can not make it work. I seen that PT and Postgree are installed in "Program Files (x86)" folder (in XP the folder is "Program Files"), but also by changing the key "C:\Program Files (x86)\PostgreSQL\8.3\bin\pg_ctl.exe" runservice -w -N "pgsql-8.3" -D "Z:\Program Files\PostgreSQL\8.3\data\" i don't get results.

PostgreSQL says: Error: psql: could not connect to server: Connection refused Is the server running on host "192.168.0.1" and accepting TCP/IP connections on port 5432?

If i install PT and PostgreSQL with default configuration (database in "C:\Program Files (x86)\PostgreSQL\8.3\data\") it work perfectly.

Someone can help me ?

Ty in advance
scienziato
 
Posts: 7
Joined: Wed Jan 28, 2009 6:56 pm

Re: share database on USB drive - problem with Win 7

Postby kraada » Tue Sep 07, 2010 8:30 am

What's the IP address of the machine things aren't working on?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: share database on USB drive - problem with Win 7

Postby scienziato » Wed Sep 08, 2010 4:46 pm

kraada wrote:What's the IP address of the machine things aren't working on?


With laptop i use a public wireless connection;

Suffisso DNS specifico della connessione:
IPv4: 192.168.1.51
Subnet mask IPv4: 255.255.255.0
Gateway predefinito IPv4: 192.168.1.2
Server DHCP IPv4: 192.168.0.2
Server DNS IPv4: 192.168.0.1
Server WINS IPv4:
NetBIOS su TCP/IP attivato: Sì
Indirizzo IPv6 locale rispetto al collegamento: fe80::cda7:29d8:115c:c134%12
Gateway predefinito IPv6
Server DNS IPv6

By the way i installed the last PT3 version and the postgreSQL associated with it. It correctly run.

After this i stop postgre and i modify the register key; when i try to restart postgree it doesn't connect to database; and PT doesn't work obviously (it doesn't find a database).
scienziato
 
Posts: 7
Joined: Wed Jan 28, 2009 6:56 pm

Re: share database on USB drive - problem with Win 7

Postby kraada » Wed Sep 08, 2010 5:01 pm

Can you connect via PGAdmin III on the Start menu? If PT3 is looking for the database at the same static IP address, that could explain what's going on here, but I want to make sure that PostgreSQL is in fact running properly first . . .
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: share database on USB drive - problem with Win 7

Postby scienziato » Wed Sep 08, 2010 7:09 pm

kraada wrote:Can you connect via PGAdmin III on the Start menu?


Yes, if i open PGAdmin and connect database (by right click on "PostgreSQL Database Server 8.3" -> connect) it runs; but if i try to connect from "control panel/.../services" i don't obtained any results
scienziato
 
Posts: 7
Joined: Wed Jan 28, 2009 6:56 pm

Re: share database on USB drive - problem with Win 7

Postby WhiteRider » Thu Sep 09, 2010 4:53 am

Unfortunately Kraada is off for a couple of days - what have you entered in the "Server" field in PT3 when you're trying to connect?
WhiteRider
Moderator
 
Posts: 54017
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: share database on USB drive - problem with Win 7

Postby scienziato » Sat Sep 11, 2010 9:55 am

WhiteRider wrote:Unfortunately Kraada is off for a couple of days - what have you entered in the "Server" field in PT3 when you're trying to connect?


PostgreSQL server information

Database: PT3_2010_09_11_154413

Server: localhost - user: postgres

Port: 5432 - password: xxxxxxx

If i try to connect with "database already exist" and "browse" it says: "Unable to login to database (template1). Reason: FATAL: no pg_hba.conf entry for host "#1", user "postgres", datrabase "template1", SSL off"

Ty in advance
scienziato
 
Posts: 7
Joined: Wed Jan 28, 2009 6:56 pm

Re: share database on USB drive - problem with Win 7

Postby kraada » Sat Sep 11, 2010 12:35 pm

Please paste the contents of the pg_hba.conf file here - you can find it in the data directory on your USB drive.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: share database on USB drive - problem with Win 7

Postby scienziato » Sun Sep 12, 2010 2:30 pm

kraada wrote:Please paste the contents of the pg_hba.conf file here - you can find it in the data directory on your USB drive.


Tipo: host - database: All - Utente: All - Indirizzo IP: 127.0.0.1/32 - Metodo: md5

I wrote the information because i can't paste directly the screen shot.
scienziato
 
Posts: 7
Joined: Wed Jan 28, 2009 6:56 pm

Re: share database on USB drive - problem with Win 7

Postby kraada » Mon Sep 13, 2010 8:59 am

Add another line at the bottom:
host all all ::1/128 md5

Save the file, restart the server, and see if that helps.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Next

Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 20 guests

cron