PDA

View Full Version : Add new database on external pc


Helveticus
05-29-2010, 12:17 PM
Hello

I'm having trouble with adding a new database. I'm using PokerTracker 3 database, but the database is on a different pc in my network. So how can I connect to the database? The username, password and port is clear, but what to write in host?

\\xx.xxx.xxx.xxx? That means the ip of the pc with the database.

Or the computer name of the pc?

And which files or folders I have to share on the pc with the database?

Zandry
05-29-2010, 02:25 PM
1) To find your computer's IP, go to the Computer with PT3/Postgresql installed and go to Start > Run > and type "cmd". Then in the command prompt type "ipconfig" it should list your ip addresses, you want the ip for that computer on the network, it will look like 192.168.x.x

-------------

2) You also have to change the configuration in your postgres to accept connections from other computers. To do this:

a) Go to Start > Programs > Postgresql > Configuration Files > edit pg_hba.conf

in the file, make sure all lines are commented out with a # in front and paste this line at the bottom, without a # in front:

host all all 0.0.0.0/0 trustb) Go to Start > Programs > Postgresql > Configuration Files > edit postgresql.conf

find the line that says "listen_addresses" and make sure it is NOT commented with a # and make it look like this:

listen_addresses = '*'Then restart your postgresql server and you should be able to connect from other computers

Helveticus
05-29-2010, 03:41 PM
It didn't work, but then I found following.

http://faq.holdemmanager.com/questions/90/Run+PostgreSQL+Over+a+Network+

http://forums.holdemmanager.com/manager-general/10901-missing-erroneous-pg_hba-conf-file.html

Now it works perfectly.

Zandry
05-30-2010, 11:58 AM
Ok, good job :) But I don't see the difference between the method I gave and the method you're linking to :)