Createdb Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site
Createdb: Database Creation Failed: Error: Permission Denied To Create Database
About Us Learn more about Stack Overflow the company Business Learn more about postgres role does not exist mac hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Psql: Fatal: Database "user" Does Not Exist
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Createdb does not create createdb postgres example a db in postgres: no error message up vote 1 down vote favorite When I try to create a db in postgres 9.3, it does not create the database. I do not get any error messages. abramhandler-# createdb orleansgis abramhandler-# \list List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges --------------+--------------+----------+-------------+-------------+------------------------------- abramhandler | abramhandler | UTF8 | en_US.UTF-8 | sudo: unknown user: postgres en_US.UTF-8 | postgres | abramhandler | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | abramhandler | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/abramhandler + | | | | | abramhandler=CTc/abramhandler template1 | abramhandler | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/abramhandler + | | | | | abramhandler=CTc/abramhandler (4 rows) abramhandler-# I tried entering #commit and it still does not show the database. The docs show how to debug error messages -- but I'm not sure what to do when I get no error message at all. It simply does not create the database. postgresql share|improve this question asked Mar 26 '14 at 13:12 bernie2436 3,8801765143 1 SQL statements in psql need to be terminated with a ; - but createdb is not a SQL command it's a commandline program. From within psql you would need to run create database orleansgis; (don't forget the ;) –a_horse_with_no_name Mar 26 '14 at 13:26 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted createdb is a shell command line command. At the psql client prompt use the create database command When the prompt is -# it is still w
8.1 / 8.2 / 8.3 / 8.4 / 9.0 PostgreSQL 8.2.23 Documentation Prev Fast Backward Chapter
Psql Fatal Role Does Not Exist Windows
1. Getting Started Fast Forward Next 1.3. Creating a Database The fatal role does not exist rails first test to see whether you can access the database server is to try to create a
Pg::insufficientprivilege: Error: Permission Denied To Create Database
database. A running PostgreSQL server can manage many databases. Typically, a separate database is used for each project or for each user. Possibly, your site administrator has already created http://stackoverflow.com/questions/22662147/createdb-does-not-create-a-db-in-postgres-no-error-message a database for your use. He should have told you what the name of your database is. In that case you can omit this step and skip ahead to the next section. To create a new database, in this example named mydb, you use the following command: $ createdb mydb This should produce as response: CREATE DATABASE https://www.postgresql.org/docs/8.2/static/tutorial-createdb.html If so, this step was successful and you can skip over the remainder of this section. If you see a message similar to createdb: command not found then PostgreSQL was not installed properly. Either it was not installed at all or the search path was not set correctly. Try calling the command with an absolute path instead: $ /usr/local/pgsql/bin/createdb mydb The path at your site might be different. Contact your site administrator or check back in the installation instructions to correct the situation. Another response could be this: createdb: could not connect to database postgres: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? This means that the server was not started, or it was not started where createdb expected it. Again, check the installation instructions or consult the administrator. Another response could be this: createdb: could not connect to database postgres: FATAL: role "joe" does not exist where your own login name is menti
Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack http://gis.stackexchange.com/questions/71130/how-to-create-a-new-gis-database-in-postgis Overflow the company Business Learn more about hiring developers or posting ads with us Geographic Information Systems Questions Tags Users Badges Unanswered Ask Question _ Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top does not How to create a new 'gis' database in PostGIS? up vote 8 down vote favorite 5 I'd like to create a new database in PostGIS, so I can load stuff into it while the current database is being used. According to the docs Some packaged distributions of PostGIS (in particular the Win32 installers for PostGIS >= 1.1.5) load the PostGIS functions into a template database called template_postgis. If the template_postgis database exists in your does not exist PostgreSQL installation then it is possible for users and/or applications to create spatially-enabled databases using a single command. In my case this appears not to be so: $ createdb -T template_postgis my_spatial_db createdb: database creation failed: ERROR: template database "template_postgis" does not exist In the past I have messed around with copying the primary gis database, then deleting the contents of all the tables. There must be a better way. What do you do if you accidentally drop it? postgis postgresql database create share|improve this question edited Sep 11 '13 at 14:35 RyanDalton 15k666133 asked Sep 11 '13 at 0:03 Steve Bennett 1,6541927 See gis.stackexchange.com/questions/19432/… –Mapperz♦ Sep 11 '13 at 1:05 add a comment| 3 Answers 3 active oldest votes up vote 19 down vote I don't know what version of PostGIS you are using but on >2.0 I first login using psql: psql -U postgres Then I create a database: CREATE DATABASE example_gis; Then I move into this database: \connect example_gis; And then I run the commend: CREATE EXTENSION postgis This creates all the spatial functions, and object types in this database. share|improve this answer answered Sep 14 '13 at 23:00 djq 8,3261379161 add a comment| up vote 3 down vote accepted Following @novicegis's link, this worked for me with postgis 1.5: db=gis sudo -su postgres <