So I'll do the Macintosh connection first, so I'm on a Mac and I have downloaded Postgrads and I dragged
this over to my applications folder, so it's all installed.
So I'll open my applications folder and I'll start Postgres and I'll just check automatically.
So what I want to do now is initialize the database, so I'll initialize it by clicking the initialize
button.
And there we are.
So it's now running so postcrisis running it up in the menubar.
I have a little postgrads thing here and I can start and stop the application as necessary.
So I've got that running.
So let's now start De Beevor, which I also installed.
So there's Dvir that fires up and I need to connect to my local server.
So what I'm going to do is create a new connection.
So let's come over here to this little button and click on it and create a connection.
And we're going to connect to Posterous.
There it is next.
And I'm going to connect to localhost the database.
I'm going to actually come to this tab and say show all databases and go back to the main and my username
will be my username on my Mac.
And you can see that by opening up your favorite terminal window and typing Who am I?
And it says, I'm TKs.
Let's go back to Deaver and I might connect using tax and leave the password empty.
And let's try this out.
Let's say test connection and it says connect it.
Great.
So I will finish and I'm connected.
Now, when you installed this when you started for the first time, it may ask you to download some
extra components, just choose the defaults and install them and you should be able to connect.
So I'm now connected.
When I click on the server name, it lists all of the databases that I have.
So I have two databases right now, Postgres, which you can never delete.
If you do, very bad things happen.
And by default I created a database for me.
TC's, that's my username.
Your username.
Your username will appear here.
It won't be TC's obviously, but I actually want to create a new database and I'm going to come up here
and choose what c I want to.
Right.
Click on this and choose, create a database and I'll create one for our bookings project which I will
call bookings.
OK, so that creates a database for me and it's an empty database.
Every database in postgrads has a schema and the schema will be working with is the default public schema.
OK, so inside that public schema, it'll show all the things that we have right now.
There's nothing in this.
It's pretty much empty.
So if I try to look at tables, for example, there's nothing there and I can create a table by saying
create a new table, but we'll do that after we get everyone up and running and connected to the database.
So right now we have a database running and we can connect to it using using.
Right now, just to be clear, if I quit out of Dvor, yes, I want to quit.
And then I stopped the database by quitting out of postgrads or stopping the database.
So I'll just quit it entirely if I try to connect now using Dvor, it's not going to work because the
database is not running.
So make sure your database is running before you try to connect to it.
So if I try to connect to my local server postgrads, it'll say Connection refused.
But if I start it back up by going back to Postgres, the server starting it up, it will run and now
I can connect to it.
And there are and there's our bookings database.
All right.
So I'm going to do the same thing for Windows users just to get you all connected for once on my Windows
machine, obviously, and then we'll start playing with the actual database itself.