So we finally arrived at the moment where we actually start working with my as well.
And by start working with I mean we're just going to install it and make sure it's running correctly
on our cloud nine instance.
But still it's something.
So before we dive into that I just want to show you a post on the Cloud Nine community.
This is written by one of the employees at cloud 9 and he's explaining how to use my Q Well inside of
cloud 9 instead of a workspace and basically what it talks about is that they've created Clubine really
quick and easy way to get my as well running in one of your workspaces.
It's much much easier than what you would need to do to install it on your own.
They have a nice little shortcut.
There are three commands that we'll talk about.
There are the three that are here basically start stop and Seelye.
But before we go any further I just want to point out that these are not General Myers commands that
you can run on any machine anywhere.
These are actually cloud nine specific.
So the upside of this is that they've made it really really easy almost too easy to get going with my
ask you Will you just run these commands and you're there.
It's kind of magical.
The slight downside of that is that it doesn't work on every single machine and it is quite specific.
So when you do install on a Mac or on a PC you always just have to relearn a new command to do basically
the same thing.
But for now since we're in cloud nine we get to appreciate how easy it is.
So the first command is MY as well dash CTO space start and you'll notice that the three commands we're
going to take a look at.
All start with this.
My Eskew Dasch CTO and I believe it stands for command line tool CTO.
It's just the abbreviation that cloud 9 came up with.
So this first one if we look at their documentation tells us it starts as well and it will create an
empty database.
The first time you started.
So let's give it a shot.
You might notice that I cleared out everything in this directory.
He got rid of those two starter files.
You don't have to do that.
But I just wanted to get rid of clutter.
So we're going to ride my ass.
Q Well dash CTO space start you can see it's hard at work installing my s.
Q Well it's starting up a server.
It's doing a few other things.
I don't need to worry too much about that.
It tells us a root user is my account name database name is C9.
It created a database for us.
Again we'll dive more into this in the next section when we actually start talking about databases and
how you create them and to work with tables and write sequel.
For now all that we really care about is that something happened.
Where does it get.
So the next command is the same thing as to help Dasch CTO space this time.
And that stands for command line interface.
And what this will do is it will startup see my s Cuil interactive show.
And if you've worked with any database before usually there is an interactive shell that goes along
with it.
Or if you've worked with things like Ruby or Python or Noad there are usually terminal or command line
based interactive environments.
If this is all new to you I think it's easiest to understand it just by using it and taking a look at
it.
So now let's try this again this time my as well dash CTO space CLID and we hit enter.
So now we have a bunch of new text.
Welcome to my as well monitor commands and with semi-colon and we'll come back to that in just a second.
Tells us are my sequel my s.
Q Well connection server version copyright gives us a little copyright notice here and now we're inside
of what's known as the my s q all interactive show or the monitor.
So this is where we can go to actually type commands.
So if you think back to the telephone book example this is where we would go and say things like find
me all users in our database who have a first name that is three characters long or find we all users
in our database who are 18 years or older.
So this is where we can go to type code to interact with an Access database.
But it's also where we can go and type code that works more on the matter of.
You can think of it as doing things around permissions creating entirely new databases transferring
data from one database to another.
There's a whole bunch of things we do in this show and we'll be working with this quite a bit.
So for now we're not going to do that.
We're going to wait till the next section all that we're going to see right now is that you can quit
this.
There are quite a few ways of quitting the show.
We can use exit notices semi-colon quit.
Also notice the semi-colon we can use backslash.
Q I always mix up forward and back slash but this slash pointing down.
Q Or what.
I usually use Control C so whatever works best for you.
I think there are actually a couple more different ways of quitting depending on the platform you're
using.
But for me I usually use Control-C but just to illustrate that I'll do two of them.
So let's do quit and go on we get a nice message by Seems that will said we can restart the Selye but
either retyping that whole thing or just hitting the up arrow.
So I'm going to do that now and hit enter.
We get this exact same message.
You'll see it every time.
This time I'm going to use the Control see just have to trust me.
Did it actually you won't because you can see it here Control C this time it says aborted.
So it turns out there actually is a little bit of a difference.
If you notice or appear it said by it kind of was expecting to quit because I use the Quit command.
And here I just ended the process.
Which is why it says aborted.
So technically there's a difference but I just use Control-C because you don't have to type anything.
It's much easier.
You don't have to hit the enter key you don't need a semi-colon.
Really whatever you prefer.
Some people like to be more explicit and use quit or exit.
OK.
So the last command that we're going to take a look at is my ask.
Well dash see T.L. space stop and you're really really rarely going to use this one but this one will
do is stop the minuscule process completely.
So I understand what that means.
It helps to understand what happened when we typed this first command here that started everything.
So what that did is that it started up a new instance of my s.
Q Well then that's running constantly in the background at all times until we stop it when we use this
second command my s to l CTO CLID.
I know it's a lot of abbreviations here but when we use that CLID command it is connecting to the instance
of my s l that was started up from the first command.
So just to reiterate this Seelye when we do this and started up it is connecting to my s l connection
that we started up earlier so I'll exit and if we wanted to we can stop that background process we can
stop my rescue from running completely.
So we're not just stopping the Seelye.
This has already stopped here.
We can stop everything related to my ask while using my q dash CTO stop and it just tells us stopping
my escort database server blah blah blah.
OK so three command.
Realistically the way that this whole work is that well started up and we're going to leave it running
for basically the entire course and we're going to start and stop the Selye all the time.
Pretty much every other video will be starting up the Selye typing some code quitting.
So you should get used to that but you don't really need to worry about stopping it all that often.
OK so next up we just have a quick little exploratory activity where you'll be able to type some new
commands into this reply and see what happens.