Re: Creating a PostgreSQL db

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

 



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 that exists by default is "postgres".  Use that use to create
> > new users and databases:
> > 
> > su postgres -c "createuser x"
> 
> I still get an error, but a different one.
> 
>   $ createdb gurgaon_routing
>   createdb: database creation failed: ERROR:  permission denied to create database
> 
> The logs say the exact same thing, what is going wrong?

Okay, this worked:

  # su - postgres
  $ psql -c 'ALTER USER user CREATEDB'
  ALTER ROLE

I guess I understand it, just wish this was clear in the docs.  I found
the answer here:

  http://www.postgresql.org/message-id/463B31D5.8040308@xxxxxxxxxxxx

Even the official tutorial says things like:

  If you installed PostgreSQL yourself then you should log in for the
  purposes of this tutorial under the user account that you started the
  server as.

instead of the above advice!

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux