can't connect to postmaster or postgresql server
От | Ramon Orticio |
---|---|
Тема | can't connect to postmaster or postgresql server |
Дата | |
Msg-id | 20040930015603.126.qmail@web54007.mail.yahoo.com обсуждение исходный текст |
Список | pgsql-novice |
i'm new to linux. i started the postgresql 7.4 server in the root using red hat 9 and it says that Postmaster already running. but when i used QT Designer's database connection, in which i wrote Driver: QPSQL7 database: all user: all, host: localhost a dialog box appears stating: can not connect to the database. please ensure that the database is running and that all the connection information is correct. [QPSQL: unable to connect could not connect to server. connection refused. is the server running on host localhost and accepting TCP/IP connections on port 5432? i tried to open the pg_hba.conf and postgresql.conf to change the tcp/ip from false to true still the problem persists. prior to this, when i used $ postmaster -D /var/lib/pgsql/data, the following message is posted FATAL: cannot open /var/lib/pgsql/data/PG_VERSION: Permission denied. sometime when i type service postgresql start in the root the following message is posted: bash: service: command not found itried to loggin as posgres user and used bash-2.05b$ service postgresql start the same message is posted. bash: service: command not found However, i followed the tutorial below and i got it correct: Login as user postgres: su - postgres Initialize PostgreSQL database server: /usr/bin/pg_ctl -D /var/lib/pgsql/data -p /usr/bin/postmaster -l logfile start & Create a database: createdb bedrock (As Linux user postgres) Connect to the database: psql bedrock Execute command as Linux user postgres You will now be at the PostgreSQL command line prompt. bedrock=# \c bedrock You are now connected to database bedrock. bedrock=# create table employee (Name char(20),Dept char(20),jobTitle char(20)); CREATE bedrock=# INSERT INTO employee VALUES ('Fred Flinstone','Quarry Worker','Rock Digger'); INSERT 18733 1 bedrock=# INSERT INTO employee VALUES ('Wilma Flinstone','Finance','Analyst'); bedrock=# INSERT into employee values ('Barney Rubble','Sales','Neighbor'); bedrock=# INSERT INTO employee VALUES ('Betty Rubble','IT','Neighbor'); bedrock=# SELECT * from employee; __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
В списке pgsql-novice по дате отправления: