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 ======================================================