Re: Creating a PostgreSQL db

2016-03-09 Thread Suvayu Ali
On Thu, Mar 10, 2016 at 01:26:40AM +0530, Suvayu Ali wrote: > Hi Gordon, > > On Wed, Mar 09, 2016 at 10:50:03AM -0800, Gordon Messmer wrote: > > On 03/09/2016 10:18 AM, Suvayu Ali wrote: > > >Shouldn't the local line take care of my permissions? What am I doing > > >wrong? > > > > The only user

Re: Creating a PostgreSQL db

2016-03-09 Thread Suvayu Ali
On Wed, Mar 09, 2016 at 12:59:49PM -0600, Michael Cronenworth wrote: > On 03/09/2016 12:18 PM, Suvayu Ali wrote: > >I want to create a PostgreSQL db. So I did the following: > > > > $ su - > > # su - postgres > > $ pg_ctl initdb -D /var/lib/pgsql/data > > For future reference there is a hel

Re: Creating a PostgreSQL db

2016-03-09 Thread Suvayu Ali
Hi Gordon, On Wed, Mar 09, 2016 at 10:50:03AM -0800, Gordon Messmer wrote: > On 03/09/2016 10:18 AM, Suvayu Ali wrote: > >Shouldn't the local line take care of my permissions? What am I doing wrong? > > The only user that exists by default is "postgres". Use that use to create > new users and d

Re: Creating a PostgreSQL db

2016-03-09 Thread John Obaterspok
2016-03-09 19:59 GMT+01:00 Michael Cronenworth : > On 03/09/2016 12:18 PM, Suvayu Ali wrote: > >> I want to create a PostgreSQL db. So I did the following: >> >>$ su - >># su - postgres >>$ pg_ctl initdb -D /var/lib/pgsql/data >> > > For future reference there is a helper script that

Re: Creating a PostgreSQL db

2016-03-09 Thread Michael Cronenworth
On 03/09/2016 12:18 PM, Suvayu Ali wrote: I want to create a PostgreSQL db. So I did the following: $ su - # su - postgres $ pg_ctl initdb -D /var/lib/pgsql/data For future reference there is a helper script that can do this stuff for you. # postgresql-setup --init-db And when you

Re: Creating a PostgreSQL db

2016-03-09 Thread Gordon Messmer
On 03/09/2016 10:18 AM, Suvayu Ali wrote: Shouldn't the local line take care of my permissions? What am I doing wrong? The only user that exists by default is "postgres". Use that use to create new users and databases: su postgres -c "createuser x" -- users mailing list users@lists.fedorap

Creating a PostgreSQL db

2016-03-09 Thread Suvayu Ali
Hi, I want to create a PostgreSQL db. So I did the following: $ su - # su - postgres $ pg_ctl initdb -D /var/lib/pgsql/data $ exit # systemctl start postgresql # exit $ createdb mydb createdb: could not connect to database template1: FATAL: role "user" does not exist I don't u