[SOUND] So right here we have one of the labs running in Coursera, and what we're going to do is use the VS Code on the browser to kind of work ourselves around this connection to MySQL. What you will see is a fully fledged out VS Code stager but in reality, this should work very similar, if not identical, as if you were running VS Code locally on your computer. There will be some similarities and we'll see how that looks. So once you open the lab, this is kind of like what you will see. And this is fairly disruptive because it's like a new environment, there are things that are already set up for you, but it's not entirely clear what those are. So a quick thing that we can do is check the extensions here on the left and let's look for MySQL. It's going to start typing MySQL here, and what we have is this one right here, it's a management tool. You can install it as well if you have obviously locally, and it allows us to do several different things we can list MySQL Servers, databases, tables, columns and run queries. This is very powerful, and it's already pre installed here. So if this wasn't installed, you will be coming here and installing it right there from the extension step. Now we know it's installed pit. It's not very clear how to work with it. So let's go back here to the File Explorer, and you will see that although the Open Folder and the Clone Repository are kind of like the main things that you can see here if we minimize this View by clicking here on the current, you'll see that there's some MySQL option. Let's close this extension MySQL here very quickly so that it's not distracting, and we're going to click on MySQL and you'll see that there's nothing showing up. Well, we need to connect to MySQL Database and want to achieve that by clicking this little plus button that effectively allows us to create a connection. Now, there are a few things that you need to add a connection or to create a connection to a database, and we will get some prompts. The first thing is the hostname of the database. Now, in this case, the database is living in localhost. It's the same machine but if you were connecting to remote MySQL Database, that could effectively be an IP or a FQDN, a fully qualified domain name. So let's type in here localhost, and then hit Return, and then we'll get another prompt. We need the MySQL user to authenticate. In this case, we're going to authenticate as the root user. Ideally, you will have a particular user for a production database that has permissions restricted just to the things that you need to do. In this case, it's fine because we're just learning and we want to have all the permissions available. So when I use root right here, and hit Return and again, ideally, you would have like a very secure password. But in this case, this is just a test database that does not have a passport for the root user. This is fairly uncommon in a production environment, and actually, I would highly advise you always set a very strong password and allow connections just for certain to particular destinations from particular sources. So in this case, this is just localhost and is running in the lab. So this is not really a matter of concern. So I'm going to hit return once again and it pre populates 3306, which is the default, MySQL ports and that means that we can connect. We can use that port to connect with the MySQL database DCs. Again normal but if it was something different, then you have the option to change here. So I'm going to hit Return once more and finally, we're going to get a prompt for a certificate file path. So this is optional. Sometimes you have a connection to a MySQL database that is encrypted with SSL, and in that case, you need to provide a particular certificate for the SSL connection. In this case, we're not using SSL, our connection is not encrypted, so I'm going to leave this alone. So we click Return there, and now you can see that we have localhost right here. It appears sometimes if you have, like a problem connecting once you click the carrot you will see that there's an air string. Let's see if we get an air string or we get something else. So no air string and we're getting four databases. These are the default databases that you will see once you connect to a brand new or empty MySQL Database. Now, and that is how you connect to a MySQL Database, but other than that, we can try really quickly and see if we can run some queries. The first thing that you can do is select one of these databases on the left. We can try MySQL. You can see that once I click on the We'll see all of the tables that are available. But we can run a new query, so I'm going to right click, and this little menu will show up and a New Query will effectively create a New File. So here we want to do a select statement, select everything from user, and then you might feel attempted to use this little play button here, which is usually the thing that you would click to run some code. But you shouldn't do this because it doesn't do anything you will get an air. Let's try that really quickly. Good language not supported or define. So unfortunately, that's not the way how you run queries from VS Code. You need to run something else to run the query. So what you need to do is you need to use the Command Palette. To use the command palette, you can go to the View Menu here and use Command Palette. In this case is shift command p for me since I'm on a Mac. But it might be something different for you. So if I do that, then this opens up. So to run that query, I can just click and Run MySQL Query, and it will run, and you can see executing MySQL query, finish MySQL query, and then you'll get some results right here. So that is kind of like you would run some query and and get some output. In this case, the results are not very good, but if you wanted to look at the user table, you can see some of the things there that are available for us. So this is very useful. A few things that you have to keep in mind, the user name, the password reports, the string, the connection type. And you need to be aware of all of these differences and all these things that may come up when you're connecting to a MySQL database.