either the default socket as defined by the PGHOST environment variable:

55

{{{

56

postgres://user:password@/database

57

}}}

58

or a specific one:

59

{{{

60

postgres://user:password@/database?host=/path/to/socket/dir

61

}}}

62

49

63

Note that with PostgreSQL you will have to create the database before running

50

64

`trac-admin initenv`.

51

65

52

And make sure PostgreSQl DB name is "trac". What worked for me:

53

And didn't work uppercase trac-user-name

66

See the [http://www.postgresql.org/docs/ PostgreSQL documentation] for detailed instructions on how to administer [http://postgresql.org PostgreSQL].

67

Generally, the following is sufficient to create a database user named `tracuser`, and a database named `trac`.

54

68

{{{

55

sudo su - postgres -c createdb trac

56

sudo su - postgres -c psql trac

57

CREATE USER trac-user-name WITH PASSWORD 'trac-pass-name';

69

createuser -U postgres -E -P tracuser

70

createdb -U postgres -O tracuser -E UTF8 trac

71

}}}

72

When running `createuser` you will be prompted for the password for the user 'tracuser'. This new user will not be a superuser, will not be allowed to create other databases and will not be allowed to create other roles. These privileges are not needed to run a trac instance. If no password is desired for the user, simply remove the `-P` and `-E` options from the `createuser` command. Also note that the database should be created as UTF8. LATIN1 encoding causes errors trac's use of unicode in trac. SQL_ASCII also seems to work.

73

74

Under some default configurations (debian) one will have run the `createuser` and `createdb` scripts as the `postgres` user. For example: