I installed postgresql in ubuntu but I am unclear how to start or configure it for a local server (apache)
I tried typing (at the terminal prompt)
psql
but I am getting this error message:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432
I'm used to mysql where you can just type
mysql -u username -p password
I also just tried re-installing postgresql, this is my error message:
Setting up postgresql-9.1 (9.1.3-0ubuntu0.11.10) ...
* Starting PostgreSQL 9.1 database server * The PostgreSQL server failed to start. Please check the log output:
2012-03-05 10:57:06 EST LOG: invalid connection type "localhost"
2012-03-05 10:57:06 EST CONTEXT: line 76 of configuration file "/etc/postgresql/9.1/main/pg_hba.conf"
2012-03-05 10:57:06 EST LOG: invalid connection type "METHOD"
2012-03-05 10:57:06 EST CONTEXT: line 100 of configuration file "/etc/postgresql/9.1/main/pg_hba.conf"
2012-03-05 10:57:06 EST FATAL: could not load pg_hba.conf
[fail]
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-9.1 (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of postgresql:
postgresql depends on postgresql-9.1; however:
Package postgresql-9.1 is not configured yet.
dpkg: error processing postgresql (--configure):
dependency problems - leaving unconfigured
root
orsudo
access to run something as userpostgres
?