Dear my friends.... I am trying to config my postgres on SuSE 10 but it does not run properly. I want to use tcp/ip connection because I am going to use KNoda to administrate the database. I just installed the postgres and it was installed successfully. But I can not login with psql: " acer-suse:/usr/local/pgsql # psql rumahsakit psql: FATAL: database "rumahsakit" does not exist acer-suse:/usr/local/pgsql # psql -U postgres -W Password for user postgres: psql: FATAL: Ident authentication failed for user "postgres" acer-suse:/usr/local/pgsql # " I created the rumahsakit database from YaST2 (Miscellanous-->postgres administration). Please tell me, why does my postgres not run properly? Thank you very much in advance. this is my postgresql.conf: ========= #--------------------------------------------------------------------------- # FILE LOCATIONS #--------------------------------------------------------------------------- # The default values of these variables are driven from the -D command #line # switch or PGDATA environment variable, represented here as ConfigDir. #data_directory = 'ConfigDir' # use data in another directory #hba_file = #'ConfigDir/pg_hba.conf' # host-based authentication file #ident_file = 'ConfigDir/pg_ident.conf' # IDENT configuration file # If external_pid_file is not explicitly set, no extra pid file is #written. #external_pid_file = '(none)' # write an extra pid file #--------------------------------------------------------------------------- # CONNECTIONS AND AUTHENTICATION #--------------------------------------------------------------------------- # - Connection Settings - # what IP address(es) to listen on; listen_addresses = '192.168.1.65' # comma-separated list of addresses; defaults to 'localhost', '*' = all port = 5433 max_connections = 150 # note: increasing max_connections costs ~400 bytes of shared memory #per # connection slot, plus lock space (see max_locks_per_transaction). You # might also need to raise shared_buffers to support more connections. #superuser_reserved_connections = 2 #unix_socket_directory = '' #unix_socket_group = '' # octal unix_socket_permissions = 0777 #bonjour_name = '' # defaults to the computer name # - Security & Authentication - #authentication_timeout = 60 # 1-600, in seconds #ssl = off #password_encryption = on #db_user_namespace = off # Kerberos #krb_server_keyfile = '' #krb_srvname = 'postgres' #krb_server_hostname = '' # empty string matches any #keytab entry #krb_caseins_users = off # - TCP Keepalives - # see 'man 7 tcp' for details #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; # 0 selects the system default #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; # 0 selects the system default #tcp_keepalives_count = 0 # TCP_KEEPCNT; # 0 selects the system default
What do you have the pg_hba.conf file? That file controls security. Patrix Linux wrote:
Dear my friends....
I am trying to config my postgres on SuSE 10 but it does not run properly. I want to use tcp/ip connection because I am going to use KNoda to administrate the database.
I just installed the postgres and it was installed successfully. But I can not login with psql: " acer-suse:/usr/local/pgsql # psql rumahsakit psql: FATAL: database "rumahsakit" does not exist acer-suse:/usr/local/pgsql # psql -U postgres -W Password for user postgres: psql: FATAL: Ident authentication failed for user "postgres" acer-suse:/usr/local/pgsql # "
I created the rumahsakit database from YaST2 (Miscellanous-->postgres administration).
Please tell me, why does my postgres not run properly?
Thank you very much in advance.
this is my postgresql.conf: =========
#--------------------------------------------------------------------------- # FILE LOCATIONS #--------------------------------------------------------------------------- # The default values of these variables are driven from the -D command #line # switch or PGDATA environment variable, represented here as ConfigDir. #data_directory = 'ConfigDir' # use data in another directory #hba_file = #'ConfigDir/pg_hba.conf' # host-based authentication file #ident_file = 'ConfigDir/pg_ident.conf' # IDENT configuration file # If external_pid_file is not explicitly set, no extra pid file is #written. #external_pid_file = '(none)' # write an extra pid file #--------------------------------------------------------------------------- # CONNECTIONS AND AUTHENTICATION #--------------------------------------------------------------------------- # - Connection Settings - # what IP address(es) to listen on; listen_addresses = '192.168.1.65'
Also you may want to change listen_addresses = '192.168.1.65' to listen_addresses = '*' until you get the other stuff straighted out. It won't lissten on 12.0.0.1 with this designation.
# comma-separated list of addresses; defaults to 'localhost', '*' = all port = 5433 max_connections = 150 # note: increasing max_connections costs ~400 bytes of shared memory #per # connection slot, plus lock space (see max_locks_per_transaction). You # might also need to raise shared_buffers to support more connections. #superuser_reserved_connections = 2 #unix_socket_directory = '' #unix_socket_group = '' # octal unix_socket_permissions = 0777 #bonjour_name = '' # defaults to the computer name # - Security & Authentication - #authentication_timeout = 60 # 1-600, in seconds #ssl = off #password_encryption = on #db_user_namespace = off # Kerberos #krb_server_keyfile = '' #krb_srvname = 'postgres' #krb_server_hostname = '' # empty string matches any #keytab entry #krb_caseins_users = off # - TCP Keepalives - # see 'man 7 tcp' for details #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; # 0 selects the system default #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; # 0 selects the system default #tcp_keepalives_count = 0 # TCP_KEEPCNT; # 0 selects the system default
Hi, Frank... thanks for your respond. Please help me. This is my pg_hba.conf: acer-suse:/home/postgres/data/base/rumahsakit # cat pg_hba.conf ....... <<CUT>> ....... # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only #local all all md5 local all all password # IPv4 local connections: #host all all 127.0.0.1/32 md5 host all all 127.0.0.1/32 password # IPv6 local connections: #host all all ::1/128 md5 host all all ::1/128 password acer-suse:/home/postgres/data/base/rumahsakit # On Fri, 2006-01-20 at 13:12 -0600, Frank L. Parks wrote:
What do you have the pg_hba.conf file? That file controls security.
Patrix Linux wrote:
Dear my friends....
I am trying to config my postgres on SuSE 10 but it does not run properly. I want to use tcp/ip connection because I am going to use KNoda to administrate the database.
I just installed the postgres and it was installed successfully. But I can not login with psql: " acer-suse:/usr/local/pgsql # psql rumahsakit psql: FATAL: database "rumahsakit" does not exist acer-suse:/usr/local/pgsql # psql -U postgres -W Password for user postgres: psql: FATAL: Ident authentication failed for user "postgres" acer-suse:/usr/local/pgsql # "
I created the rumahsakit database from YaST2 (Miscellanous-->postgres administration).
Please tell me, why does my postgres not run properly?
Thank you very much in advance.
this is my postgresql.conf: =========
#--------------------------------------------------------------------------- # FILE LOCATIONS #--------------------------------------------------------------------------- # The default values of these variables are driven from the -D command #line # switch or PGDATA environment variable, represented here as ConfigDir. #data_directory = 'ConfigDir' # use data in another directory #hba_file = #'ConfigDir/pg_hba.conf' # host-based authentication file #ident_file = 'ConfigDir/pg_ident.conf' # IDENT configuration file # If external_pid_file is not explicitly set, no extra pid file is #written. #external_pid_file = '(none)' # write an extra pid file #--------------------------------------------------------------------------- # CONNECTIONS AND AUTHENTICATION #--------------------------------------------------------------------------- # - Connection Settings - # what IP address(es) to listen on; listen_addresses = '192.168.1.65'
Also you may want to change listen_addresses = '192.168.1.65' to listen_addresses = '*' until you get the other stuff straighted out. It won't lissten on 12.0.0.1 with this designation.
# comma-separated list of addresses; defaults to 'localhost', '*' = all port = 5433 max_connections = 150 # note: increasing max_connections costs ~400 bytes of shared memory #per # connection slot, plus lock space (see max_locks_per_transaction). You # might also need to raise shared_buffers to support more connections. #superuser_reserved_connections = 2 #unix_socket_directory = '' #unix_socket_group = '' # octal unix_socket_permissions = 0777 #bonjour_name = '' # defaults to the computer name # - Security & Authentication - #authentication_timeout = 60 # 1-600, in seconds #ssl = off #password_encryption = on #db_user_namespace = off # Kerberos #krb_server_keyfile = '' #krb_srvname = 'postgres' #krb_server_hostname = '' # empty string matches any #keytab entry #krb_caseins_users = off # - TCP Keepalives - # see 'man 7 tcp' for details #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; # 0 selects the system default #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; # 0 selects the system default #tcp_keepalives_count = 0 # TCP_KEEPCNT; # 0 selects the system default
On Friday 20 January 2006 12:58, Patrix Linux wrote:
I am trying to config my postgres on SuSE 10 but it does not run properly. I want to use tcp/ip connection because I am going to use KNoda to administrate the database.
To enable TCP/IP, edit /etc/sysconfig/postgresql like so: POSTGRES_OPTIONS="-i"
I just installed the postgres and it was installed successfully. But I can not login with psql: " acer-suse:/usr/local/pgsql # psql rumahsakit psql: FATAL: database "rumahsakit" does not exist acer-suse:/usr/local/pgsql # psql -U postgres -W Password for user postgres: psql: FATAL: Ident authentication failed for user "postgres" acer-suse:/usr/local/pgsql #
To create yourself as a user, become root, then postgres: su - su - postgres This necessary because postgres has an unknown password (but root can become any user). Now you can create yourself as a Postgres user: psql template1 create user username password 'password' Add "createdb" and "createuser" to the above line for superuser privileges. Now you can log back in as yourself and create your database: \q [to exit psql] exit [no longer postgres] exit [no longer root] psql template1 template1=# create database mydatabase; you should see the response "CREATE DATABASE" Make sure to switch to your database with "\c mydatabase" before adding tables, etc., because any changes to template1 are propagated to all newly created databases.
I created the rumahsakit database from YaST2 (Miscellanous-->postgres administration).
I don't see that in my YaST menu... who is the owner of rumahsakit? (type "\l" from within psql) -- ====================================================== Glenn Holmer (Linux registered user #16682) ====================================================== "Greater coherence cannot be achieved. Not even the Netherlanders have managed this." -Anton Webern ======================================================
To create yourself as a user, become root, then postgres:
su - su - postgres " Here was my try but it was failed: "
Hi Glenn... Here is what I did: 1. I editted my "/etc/sysconfig/postgresql" to put in the "POSTGRES_OPTIONS="-i". 2. rcpostgresql restart. 3. I don't understand this thread: " patrix@acer-suse:~> su Password: acer-suse:/home/patrix # login postgres Password: " and suddenly my terminal console closed unexpectedly. I found this line in my /etc/passwd: " postgres:x:26:26:PostgreSQL Server:/var/lib/pgsql:/bin/bash " What is the password of the "postgres" actually? this useraccount was created by the "postgresql-server-8.1.2-0.1.i586.rpm" as I was installing postgresql. Please help me further. On Sat, 2006-01-21 at 04:59 -0600, Glenn Holmer wrote:
On Friday 20 January 2006 12:58, Patrix Linux wrote:
I am trying to config my postgres on SuSE 10 but it does not run properly. I want to use tcp/ip connection because I am going to use KNoda to administrate the database.
To enable TCP/IP, edit /etc/sysconfig/postgresql like so:
POSTGRES_OPTIONS="-i"
I just installed the postgres and it was installed successfully. But I can not login with psql: " acer-suse:/usr/local/pgsql # psql rumahsakit psql: FATAL: database "rumahsakit" does not exist acer-suse:/usr/local/pgsql # psql -U postgres -W Password for user postgres: psql: FATAL: Ident authentication failed for user "postgres" acer-suse:/usr/local/pgsql #
To create yourself as a user, become root, then postgres:
su - su - postgres
This necessary because postgres has an unknown password (but root can become any user).
Now you can create yourself as a Postgres user:
psql template1 create user username password 'password'
Add "createdb" and "createuser" to the above line for superuser privileges.
Now you can log back in as yourself and create your database: \q [to exit psql] exit [no longer postgres] exit [no longer root] psql template1 template1=# create database mydatabase; you should see the response "CREATE DATABASE"
Make sure to switch to your database with "\c mydatabase" before adding tables, etc., because any changes to template1 are propagated to all newly created databases.
I created the rumahsakit database from YaST2 (Miscellanous-->postgres administration).
I don't see that in my YaST menu... who is the owner of rumahsakit? (type "\l" from within psql)
-- ====================================================== Glenn Holmer (Linux registered user #16682) ====================================================== "Greater coherence cannot be achieved. Not even the Netherlanders have managed this." -Anton Webern ======================================================
Patrix I think what Glenn was getting you to do was this: su - <<enter root password at prompt>> su - postgres <<you will not get prompted for a password>>
This necessary because postgres has an unknown password (but root can become any user).
Once you are logged on your box as postgres issue the command:
psql template1
This should log you into the postgresql database template1 (which comes with postgres) and now you can use the following command.
create user username password 'password'
Add "createdb" and "createuser" to the above line for superuser privileges.
Exit postgresql with "\q"
\q [to exit psql]
Now you can log back in as yourself and create your database: exit [no longer postgres] exit [no longer root] psql template1 template1=# create database mydatabase; you should see the response "CREATE DATABASE"
Make sure to switch to your database with "\c mydatabase" before adding tables, etc., because any changes to template1 are propagated to all newly created databases.
Stuart
Dear Stuart. Thank you very much for help. Yes, you're very correct. once again thanks. I can administrate my postgresql with psql now, but not with KNoda (over TCP/IP connection). I can not login from KNoda. The values of parameter those I used are: " host = localhost database name = rumahsakit user = patrix password = postgres TCP Port = 5432 ". The error message is : " Server message: FATAL: Ident authentication failed for user "patrix" " What is my mistake? please tell me. I set my password for postgres like this: " rumahsakit=# alter user patrix encrypted password 'postgres'; ALTER ROLE ". =====the postgresql.conf of "rumahsakit" postgres@acer-suse:~/data/base/rumahsakit> pwd /var/lib/pgsql/data/base/rumahsakit postgres@acer-suse:~/data/base/rumahsakit> cat postgresql.conf ...<<SNIP>>... #--------------------------------------------------------------------------- # FILE LOCATIONS #--------------------------------------------------------------------------- # The default values of these variables are driven from the -D command line # switch or PGDATA environment variable, represented here as ConfigDir. #data_directory = 'ConfigDir' # use data in another directory #hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file #ident_file = 'ConfigDir/pg_ident.conf' # IDENT configuration file # If external_pid_file is not explicitly set, no extra pid file is written. #external_pid_file = '(none)' # write an extra pid file #--------------------------------------------------------------------------- # CONNECTIONS AND AUTHENTICATION #--------------------------------------------------------------------------- # - Connection Settings - listen_addresses = '*' # what IP address(es) to listen on; # comma-separated list of addresses; # defaults to 'localhost', '*' = all port = 5432 max_connections = 150 # note: increasing max_connections costs ~400 bytes of shared memory per # connection slot, plus lock space (see max_locks_per_transaction). You # might also need to raise shared_buffers to support more connections. superuser_reserved_connections = 2 #unix_socket_directory = '' #unix_socket_group = '' unix_socket_permissions = 0777 # octal #bonjour_name = '' # defaults to the computer name # - Security & Authentication - #authentication_timeout = 60 # 1-600, in seconds #ssl = off password_encryption = on #db_user_namespace = off # Kerberos #krb_server_keyfile = '' #krb_srvname = 'postgres' #krb_server_hostname = '' # empty string matches any keytab entry #krb_caseins_users = off # - TCP Keepalives - # see 'man 7 tcp' for details #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; # 0 selects the system default #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; # 0 selects the system default #tcp_keepalives_count = 0 # TCP_KEEPCNT; # 0 selects the system default ...<<SNIP>>... =====my pg_hba.conf postgres@acer-suse:~/data/base/rumahsakit> cat ./pg_hba.conf ...<<SNIP>>... # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all password # IPv4 local connections: host all all 127.0.0.1/32 password host all all 0.0.0.0/0.0.0.0 password # IPv6 local connections: host all all ::1/128 md5 postgres@acer-suse:~/data/base/rumahsakit> On Sat, 2006-01-21 at 11:14 -0500, Stuart wrote:
Patrix
I think what Glenn was getting you to do was this:
su - <<enter root password at prompt>> su - postgres <<you will not get prompted for a password>>
This necessary because postgres has an unknown password (but root can become any user).
Once you are logged on your box as postgres issue the command:
psql template1
This should log you into the postgresql database template1 (which comes with postgres) and now you can use the following command.
create user username password 'password'
Add "createdb" and "createuser" to the above line for superuser privileges.
Exit postgresql with "\q"
\q [to exit psql]
Now you can log back in as yourself and create your database: exit [no longer postgres] exit [no longer root] psql template1 template1=# create database mydatabase; you should see the response "CREATE DATABASE"
Make sure to switch to your database with "\c mydatabase" before adding tables, etc., because any changes to template1 are propagated to all newly created databases.
Stuart
Patix, Sounds like you have an entry in your pg_hba.conf file that tells psql to go to pg_ident.conf to verify the user patrix or possibly all users. Check your pg_hba.conf file and remove references to ident. Check any default statements that might include ident. On Saturday 21 January 2006 14:38, Patrix Linux wrote:
pg_hba.conf'
Hi Stuart. I don't find any 'ident' in my pg_hba.conf. So where is the mistake? please keep teaching me. ====here is my pg_hba.conf postgres@acer-suse:~/data/base/rumahsakit> whoami postgres postgres@acer-suse:~/data/base/rumahsakit> pwd /var/lib/pgsql/data/base/rumahsakit ....<<SNIP>>.... # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all password # IPv4 local connections: host all all 127.0.0.1/32 password host all all 0.0.0.0 0.0.0.0 password # IPv6 local connections: host all all ::1/128 md5 postgres@acer-suse:~/data/base/rumahsakit> whoami postgres postgres@acer-suse:~/data/base/rumahsakit> pwd /var/lib/pgsql/data/base/rumahsakit postgres@acer-suse:~/data/base/rumahsakit> ====/etc/sysconfig/postgresql postgres@acer-suse:/etc/sysconfig> pwd /etc/sysconfig postgres@acer-suse:/etc/sysconfig> cat postgresql ## Path: Applications/PostgreSQL ## Description: The PostgreSQL Database System ## Type: string() ## Default: "~postgres/data" ## ServiceRestart: postgresql # # In which directory should the PostgreSQL database reside? # POSTGRES_DATADIR="~postgres/data" ## Path: Applications/PostgreSQL ## Description: The PostgreSQL Database System ## Type: string() ## Default: "" ## ServiceRestart: postgresql # # The options that are given to the PostgreSQL master daemon on startup. # See the manual pages for postmaster and postgres for valid options. # # Don't put "-D datadir" here since it is set by the startup script # based on the variable POSTGRES_DATADIR above. # POSTGRES_OPTIONS="-i" ## Path: Applications/PostgreSQL ## Description: The PostgreSQL Database System ## Type: string() ## Default: "C" ## ServiceRestart: "" # # Specifies the locale under which the PostgreSQL database location # should be initialized and run. If needed, it has to be changed # before PostgreSQL is started for the first time. To change the # locale of an existsing PostgreSQL database location, it must be # dumped, removed and initialized from scratch using the new locale. # # If unset or empty $RC_LANG from /etc/sysconfig/language is used. # POSTGRES_LANG="" postgres@acer-suse:/etc/sysconfig> On Sat, 2006-01-21 at 16:42 -0500, Stuart wrote:
Patix,
Sounds like you have an entry in your pg_hba.conf file that tells psql to go to pg_ident.conf to verify the user patrix or possibly all users. Check your pg_hba.conf file and remove references to ident. Check any default statements that might include ident.
On Saturday 21 January 2006 14:38, Patrix Linux wrote:
pg_hba.conf'
Patrix, Now I am puzzled. The only file that I know of that would generate an ident authentication error is the pg_hba.conf and pg_ident.conf files. If the authentication for a particular host/user combination in the pg_hba.conf is specified as ident <ident user> then postgres looks up that <ident user> in the pg_ident.conf to locate the corresponding postgres user id. The only situation I know that would generate such an error is if there is an invalid <ident user> (one that is not in the pg_ident.conf file or the <ident user> is left blank). There may be a default line such as: local all all ident sameuser in the pg_hba.conf file that may be above the commented table headings line. Do a grep for ident on the pg_hba.conf file to see if one shows up. There is also a list at "pgsql-sql@postgresql.org" that you can probably get more info on this issue.
The error message is : Server message: FATAL: Ident authentication failed for user "patrix"
Stuart On Sunday 22 January 2006 02:20, Patrix Linux wrote:
Hi Stuart.
I don't find any 'ident' in my pg_hba.conf. So where is the mistake? please keep teaching me.
====here is my pg_hba.conf postgres@acer-suse:~/data/base/rumahsakit> whoami postgres postgres@acer-suse:~/data/base/rumahsakit> pwd /var/lib/pgsql/data/base/rumahsakit ....<<SNIP>>.... # TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only local all all password # IPv4 local connections: host all all 127.0.0.1/32 password host all all 0.0.0.0 0.0.0.0 password # IPv6 local connections: host all all ::1/128 md5 postgres@acer-suse:~/data/base/rumahsakit> whoami postgres postgres@acer-suse:~/data/base/rumahsakit> pwd /var/lib/pgsql/data/base/rumahsakit postgres@acer-suse:~/data/base/rumahsakit>
====/etc/sysconfig/postgresql postgres@acer-suse:/etc/sysconfig> pwd /etc/sysconfig postgres@acer-suse:/etc/sysconfig> cat postgresql ## Path: Applications/PostgreSQL ## Description: The PostgreSQL Database System ## Type: string() ## Default: "~postgres/data" ## ServiceRestart: postgresql # # In which directory should the PostgreSQL database reside? # POSTGRES_DATADIR="~postgres/data"
## Path: Applications/PostgreSQL ## Description: The PostgreSQL Database System ## Type: string() ## Default: "" ## ServiceRestart: postgresql # # The options that are given to the PostgreSQL master daemon on startup. # See the manual pages for postmaster and postgres for valid options. # # Don't put "-D datadir" here since it is set by the startup script # based on the variable POSTGRES_DATADIR above. # POSTGRES_OPTIONS="-i"
## Path: Applications/PostgreSQL ## Description: The PostgreSQL Database System ## Type: string() ## Default: "C" ## ServiceRestart: "" # # Specifies the locale under which the PostgreSQL database location # should be initialized and run. If needed, it has to be changed # before PostgreSQL is started for the first time. To change the # locale of an existsing PostgreSQL database location, it must be # dumped, removed and initialized from scratch using the new locale. # # If unset or empty $RC_LANG from /etc/sysconfig/language is used. # POSTGRES_LANG="" postgres@acer-suse:/etc/sysconfig>
On Sat, 2006-01-21 at 16:42 -0500, Stuart wrote:
Patix,
Sounds like you have an entry in your pg_hba.conf file that tells psql to go to pg_ident.conf to verify the user patrix or possibly all users. Check your pg_hba.conf file and remove references to ident. Check any default statements that might include ident.
On Saturday 21 January 2006 14:38, Patrix Linux wrote:
pg_hba.conf'
On Sunday 22 January 2006 01:20, Patrix Linux wrote:
Hi Stuart.
I don't find any 'ident' in my pg_hba.conf. So where is the mistake? please keep teaching me.
====here is my pg_hba.conf
here's what I use (comments welcome...) local template1 postgres trust local all all md5 host all all 127.0.0.1 255.255.255.255 md5 host all all 0.0.0.0 0.0.0.0 md5 -- ====================================================== Glenn Holmer (Linux registered user #16682) ====================================================== "Greater coherence cannot be achieved. Not even the Netherlanders have managed this." -Anton Webern ======================================================
Dear Glenn... Thank you very much for yourr help... I start to understand "su - postgres". I kept thinking about this. And then I managed to understand it: " patrix@acer-suse:~/arsip/installer/postgreSQL8.1/dari_ftp.suse.com> su Password: acer-suse:/home/patrix/arsip/installer/postgreSQL8.1/dari_ftp.suse.com # su - postgres postgres@acer-suse:~> ls backups data initlog " The rest, I could follow your thread very easily and I realize you gave me a very detail steps. Thank you very much. I can administrate my postgres and its database from psql. Now my problem is only my KNoda still can not connect to my postgres. On Sat, 2006-01-21 at 04:59 -0600, Glenn Holmer wrote:
On Friday 20 January 2006 12:58, Patrix Linux wrote:
I am trying to config my postgres on SuSE 10 but it does not run properly. I want to use tcp/ip connection because I am going to use KNoda to administrate the database.
To enable TCP/IP, edit /etc/sysconfig/postgresql like so:
POSTGRES_OPTIONS="-i"
I just installed the postgres and it was installed successfully. But I can not login with psql: " acer-suse:/usr/local/pgsql # psql rumahsakit psql: FATAL: database "rumahsakit" does not exist acer-suse:/usr/local/pgsql # psql -U postgres -W Password for user postgres: psql: FATAL: Ident authentication failed for user "postgres" acer-suse:/usr/local/pgsql #
To create yourself as a user, become root, then postgres:
su - su - postgres
This necessary because postgres has an unknown password (but root can become any user).
Now you can create yourself as a Postgres user:
psql template1 create user username password 'password'
Add "createdb" and "createuser" to the above line for superuser privileges.
Now you can log back in as yourself and create your database: \q [to exit psql] exit [no longer postgres] exit [no longer root] psql template1 template1=# create database mydatabase; you should see the response "CREATE DATABASE"
Make sure to switch to your database with "\c mydatabase" before adding tables, etc., because any changes to template1 are propagated to all newly created databases.
I created the rumahsakit database from YaST2 (Miscellanous-->postgres administration).
I don't see that in my YaST menu... who is the owner of rumahsakit? (type "\l" from within psql)
-- ====================================================== Glenn Holmer (Linux registered user #16682) ====================================================== "Greater coherence cannot be achieved. Not even the Netherlanders have managed this." -Anton Webern ======================================================
participants (4)
-
Frank L. Parks
-
Glenn Holmer
-
Patrix Linux
-
Stuart