Search Postgresql Archives

createuser: could not connect to database postgres: FATAL: could not open file "global/pg_database": No such file or directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

 

I need your help to fix this problem.

 

When I ran initdb, I got the warning error below.

Then I tried to create a user.  I got error “createuser: could not connect to database postgres: FATAL:  could not open file "global/pg_database": No such file or directory”.  Please see the out put below.

 

Thank you for your help.

Tri.

 

 

 

 

-bash-2.05b$ initdb --lc-collate=C

The files belonging to this database system will be owned by user "postgres".

This user must also own the server process.

 

The database cluster will be initialized with locales

  COLLATE:  C

  CTYPE:    en_US.UTF-8

  MESSAGES: en_US.UTF-8

  MONETARY: en_US.UTF-8

  NUMERIC:  en_US.UTF-8

  TIME:     en_US.UTF-8

The default database encoding has accordingly been set to UTF8.

 

creating directory /var/lib/pgsql/data ... ok

creating subdirectories ... ok

selecting default max_connections ... 100

selecting default shared_buffers/max_fsm_pages ... 24MB/153600

creating configuration files ... ok

creating template1 database in /var/lib/pgsql/data/base/1 ... ok

initializing pg_authid ... ok

initializing dependencies ... ok

creating system views ... ok

loading system objects' descriptions ... ok

creating conversions ... ok

setting privileges on built-in objects ... ok

creating information schema ... ok

vacuuming database template1 ... ok

copying template1 to template0 ... ok

copying template1 to postgres ... ok

 

WARNING: enabling "trust" authentication for local connections

You can change this by editing pg_hba.conf or using the -A option the

next time you run initdb.

 

Success. You can now start the database server using:

 

    postgres -D /var/lib/pgsql/data

or

    pg_ctl -D /var/lib/pgsql/data -l logfile start

 

 

 

-bash-2.05b$ pg_ctl -D /var/lib/pgsql/data -l logfile start

server starting

-bash-2.05b$ createuser -A -D -P nssb

Enter password for new role:

Enter it again:

Shall the new role be allowed to create more new roles? (y/n) n

createuser: could not connect to database postgres: FATAL:  could not open file "global/pg_database": No such file or directory

 

 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux