1

So I installed postgreSQL version 9.2.4 using the default installer settings on Windows 7 64 bit. Then I launched the SQL Shell(psql) command line tool and enter all the defaults plus the password I used during the install. It logs in. The problem is that a database cannot be created, or so it appears.

I typed in creatdb mydb

also tried CREATE DATABASE mydb

I assume something happens, but when I type \list I just see the default installed databases.

Am I missing something here? Coming from MySQL and this simple task is puzzling. No errors, nothing.

1 Answer 1

7

Perhaps you should give the tutorial a try first: http://www.postgresql.org/docs/9.2/interactive/tutorial.html

Specifically, this part: http://www.postgresql.org/docs/9.2/interactive/tutorial-createdb.html

$ createdb mydb

Alternatively from the psql console:

CREATE DATABASE mydb; -- note the ; at the end
Sign up to request clarification or add additional context in comments.

7 Comments

Read that and tried that. No errors and \list doesn't show that it got created.
That's very weird, the createdb mydb should either work or give an error, for example: createdb: could not connect to database postgres: FATAL: role "myuser" does not exist
Perhaps to make things a bit easier on Windows, you can try something like pgadmin3: pgadmin.org/download
Is it perhaps I am logging into the shell utility all wrong? I am logging in pressing "enter" "enter" (defaults) until the pass then it grants me in as the default. Keep in mind I have done nothing post install. I just installed and ran the command util.
Yea I know about the admin gui, but I like command line and it should work.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.