Viewers: in countries Watching now:
MySQL is by far the most popular database management system for small- to medium-sized web projects. In this course, Bill Weinman provides clear, concise tutorials that guide you through creating and maintaining a MySQL database of your own. Bill explores the basic syntax, using SQL statements to create, insert, update, and delete data from your tables. He also covers creating a new database from scratch, as well as data types, transactions, subselects, views, and stored routines. Plus, learn about the multi-platform PHP PDO interface that will help you connect your database to web applications.
In this movie I'll show you how to install the SID application on a Mac. The first thing we need to do is import the databases that are going to be used with SID. So we're going to come over here, I've got the XAMPP welcome screen up here in my browser. I'm just going to click on php My Admin. And some over here to import to import the databases that we're going to use. There's 3 of them so I'll select choose file and this is the exercise files that I have on my desktops if I were to come to desktop exercise files that's the same thing and under sql there's 3 databases here and these are the sql commands that create the databases.
So I'll simply select the first one, and you can see a little preview of it there. If I press the spacebar and I get the quick look, you can see the preview there. This is just the SQL that's used to create this database. And I press open. Now here I want to make sure that I have UTF 8 selected. So, if it's not selected on yours you'll want to select it. And come down here and press the go button and that's imported that database. I'll do it again, press the import button there, choose a file.
And, we'll do the scratch database this time and make sure it says UTF-8 and scroll down and press go. And, one more time, import, and choose a file and choose the world database and select open. Make sure it says UTF-8 and press the go button. And it takes just a moment. And now you see we have these databases over here selected already in the databases on the side there. If I select databases up here you'll see them.
There's the album data base and the world data base, and the. Scratch database. So I can close this window here. And in fact I can quit chrome for now, I'm going to press Cmd+Q to quit that. And now we need to install the sid and the crud application as well. I have 2 finder windows open, one of them is exercise files from my desktop there. And the other one here is under applications, and XAMPP, and HTDOCS and this is where you install your files that'll be served up by the Apache web server that's part of the XAMPP package.
And Sid and Crud are written in PHP and they run under the web server, that's the whole point of the web server here. So all I do is for my exercise files I take both the Sid and the Crud folders. And I want to hold down the option key while I drag them, that'll make copies rather than moving the files. We want to make sure we're working with copies here and I'm going to drag them into this HT docs folder in the other finder window. So, I'll go and there they are, there's. CRUD and there's SID, and now we need to setup the passwords in these so that they work with the database.
Remember, we set up passwords for both of these in a previous movie. So, I'm going to Ctrl+click on SID and open it with my text wrangler text editor application. And I'm going to scroll down, scroll down, scroll down. Right here around line 50, you'll see mysql paths, and right there I'm going to type the password for the sid user that I entered into the database earlier. So here's my password that I've just used for the purpose of these demonstration readings. Do not use this same password, And the mysql user says, sid that's good, so I can save this.
And close it. And then I'm going to do the same thing in CRUD. Come up here to CRUD and open the CRUD application with my TextWrangler app. And then right up here where it has the web user, enter the password for the web user because this one doesn't need all of those special permissions that we used for SID. And so under the web user I'm going to put in that same stupid password, which you will not be using. And I'll go ahead and save that Cmd+s. Quit text wrangler with Cmd+q. And now we can open both of these in the browser.
So I'll open Chrome here, And I'm going to type in local host slash SID in all caps because that was the folder name. slash sid.php just like that, and enter and there is our SID application. I'm going to drag that into my bookmark bar here so I can open that at any time I want. And you'll notice when I say select database it's finding those databases, that actually means that it's working. We can open one of these up. And we can type in some SQL so I selected the album database and I'll type in select star from track semicolon, press go and there's the data from the track table in the album database.
And we can do the same thing in the scratch database, instead of track here we can put in customer. And select go and there's our little customer table from the scratch data base and under world we can do the same thing, we can type in city like that and press go. And there's the city table from the world data base and that all looks good. So our city application is working just great. Now I'm going to come up here and instead of sid I'm going to type in crud.
CRUD, in all caps /crud lower case .PHP, just like this local host/CRUD/crud.PHP and there's our CRUD application and you can see it's getting the data from the database there. It's looking just great, I can open one of these up and I can see the tracks, say Done. So this is working great. Now I'm going to drag this here into my bookmark bar as well. So now I have SID and I have CRUD, and both of those applications are working.
So now that you've successfully installed and they are working, you have everything that you need in order to follow along with the extra exercises in this course, So let's get started.
There are currently no FAQs about MySQL Essential Training.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.