| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 10 Jun 2010 14:54:47
|
Lucas _Sanders
New member
Joined: 25 May 2010 21:06:23
Messages: 6
Offline
|
I installed postgresql 8.4 for mac. a program I'm trying to use is asking me for ip, port, server name , and server password. ip and port are already filled in, but i forgot what i input for name and password upon installation. How can i retrieve this info?
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 11 Jun 2010 13:24:10
|
Vibhor_K
Senior member
![[Avatar]](/images/avatar/6b1086f5fb6b725a975602564298d4b9.jpg)
Joined: 3 Jul 2009 09:46:15
Messages: 518
Offline
|
For Ip: use ifconfig command or System Preferences-> click on the Network icon.
You should see your IP address under the method through which you are connected to the internet;
For port: go to data directory and check "port" parameter of postgresql.conf fle
server name: hostname command will help you.
server password: This is the one you have to recover. Go to data directory of postgreSQL and change the pg_hba.conf file entry as given below:
local all all md5
to
local all all trust
then reload the cluster as given below:
<installation directory>/bin/pg_ctl -D <data directory path> reload
After performing above change you would be able to connect to DB without password using psql as given below:
psql -U postgres -p port <dbname>
After connecting to Database use following command to re-set the password:
Alter user <username> set password ‘<password>’;
After executing above command exit from the psql prompt using "\q" command.
After performing above activity, please revert the changes in pg_hba.conf file and reload.
|
Thanks & Regards,
Vibhor Kumar
Blog:http://vibhork.blogspot.com
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 17 Jun 2010 03:45:02
|
Lucas _Sanders
New member
Joined: 25 May 2010 21:06:23
Messages: 6
Offline
|
Thanks for the reply. I am very new to mac and dont know exactly where to go to perform these tasks. I understood the ip address as that was easy enough. For port and server name where do I go? Obviously I'm guessing terminal. Do I just type host name after i type sudo bash? Please explain it like you were explaining it to a 5 year old. Would be greatly appreciated. Thanks
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 6 Jul 2010 01:06:14
|
Lucas _Sanders
New member
Joined: 25 May 2010 21:06:23
Messages: 6
Offline
|
Why is the IP address different in system preferences than the first line after typing in the ifconfig command? Which one do I use? I used the IP in the first line after the ifconfig command. I have it setup like this now.
PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the "Client Authentication" section in the
# PostgreSQL documentation for a complete description
# of this file. A short synopsis follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access. Records take one of these forms:
#
# local all all md5
# host all all 127.0.0.1/32 md5
# hostssl all all ::1/128 md5
# hostnossl all all 192.168.153.1/24 trust
#
# (The uppercase items must be replaced by actual values.)
#
# The first field is the connection type: "local" is a Unix-domain socket,
# "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an
# SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket.
#
-uu-:---F1 pg_hba.conf Top L1 (Conf[Space])-----------------------------
Loading conf-mode...done
When I tried to use this IP in my virtual machine to setup a database it didn't recognise. What am I doing wrong?
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 17 Aug 2010 03:36:01
|
Thomas_Schnaus
Member
Joined: 13 Aug 2010 13:17:05
Messages: 12
Offline
|
Lucas _Sanders wrote:
#
# local all all md5
# host all all 127.0.0.1/32 md5
# hostssl all all ::1/128 md5
# hostnossl all all 192.168.153.1/24 trust
#
What am I doing wrong?
Normally you have to uncommend the lines they should be executed (delete the '#') and if you set a IP 192.168.153.1 like yours, the subnet is /32 not /24. The range of 255 IP's is working with 192.168.153.0/24 or 192.168.153.0 255.255.255.0.
Hope it helps
|
Thomas Schnaus
Servoy Developer |
|
|
 |
|
|