MySQL Crash Course | Learn SQL
- December 22, 2023
- Posted by: MainInstructor
- Category: BASIC C E-Commerce Go JavaScript Node Oracle Database PHP Python SQL Web Development
Video Title: MySQL Crash Course | Learn SQL
This video is sponsored by dev Mountain if you’re interested in learning web development iOS or UX design dev Mountain is a 12-week design and development boot camp intended to get you a full-time position in the industry to learn more visit dev mountain comm or click the link in the description below
Hey what’s going on guys welcome to my my SQL crash course so in this course we’re going to be going over things like managing users writing SQL queries database administration can get pretty intricate but as far as writing queries to select data insert update delete all
That stuff we’re going to go over that pretty well as well as things like primary Keys foreign keys joining tables together aggregate functions and more okay I’m gonna have a link in the description to a gist with all the queries that we’re gonna write so if you
Want to follow along but you don’t feel like typing everything out you can copy and paste from that you can also use it as a reference in the future now I just want to go over some slides Before we jump in let’s talk a little bit about
What MySQL is or my sequel some people pronounce it my sequel it’s a very popular open source relational database management system there’s different types of databases our database management systems you have relational you have no SQL you have distributed graph databases there’s all different types but relational databases are very
Popular within web development with which if you’re watching my channel you’re probably interested in so some other examples are post grads Microsoft SQL Server Oracle database these are all relational and one thing that that relational databases have in common is they all as far as I know all of them
Use SQL which is structured query language and SQL for the most part is it’s just that it’s a query language to do things like select data insert sort all that stuff and it’s very similar across all relational databases it’s not identical there are some quirks in the syntax depending on which relational
Database you’re using but a lot of it is the same so if you learn MySQL chances are you’re going to learn let’s take Microsoft SQL Server for example you’ll be able to to learn that very quickly you’ll just have to learn some of the different differences in the
Syntax allright MySQL is a leading database for web applications it’s used in in small business websites all the way to very large scale enterprise applications so you can use it for just about anything it’s used with multiple languages pretty much any programming language but it’s very popular with web-based languages or languages that
Are used highly in web development like PHP nodejs which is job JavaScript Python c-sharp languages like that it’s completely cross-platform so you can install it on Linux which is probably what you’re going to use in production but you can also install it on your
Windows or Mac I’ll be using it on a Mac but I’ll also talk a little bit about some of the steps you need to take for Windows alright so a relational database is based on the relational model of data and like I said virtually all relational databases use SQL to manage them and
They use something called tables to store your data and these tables have columns and rows similar to what you’d see in like an Excel spreadsheet just much more powerful and tables and fields can relate to each other through something called keys which I’ll show an
Example of in a minute and we’ll also be doing this later on through SQL so here’s an example of a very simple table that I created so this would be like a user’s table for a website and we have an ID first name last name email and password
So what you see here going down vertically these are columns okay so we have columns that have a specific field such as ID first name and so on and then we have these rows of data that are inserted so we have this John Doe user Sara Watson so these are
Rows now each field has to have a certain data type okay and there’s a lot of different data types I’m not going to go over all of them but some of the common ones I have listed down here so for numeric we have an int which is an
Integer I believe an INT can be from anywhere from negative two billion to two billion as far as I know something like that we have tiny int which is a tiny number usually used for boolean because there’s not an actual boolean data type in MySQL
So a lot of times we’ll use either one for true and 0 for false and that will be a tiny int field we also have big int for really really big numbers we have floats for floating-point numbers for Strings we have varchar’ which is a variable character commonly used for
Things like names and emails they actually have a max of 255 characters we also have a text field for larger things like blog posts and then for really large text if you want more than like I think it’s 65,000 characters is the limit for text we have long text all
Right so a bunch of different text fields or string fields for dates we have dates we have date/time we have timestamp and then we have others like binary jason there’s there’s a lot of different data types and if you want to look into some of the more rare ones you
Can go ahead and look at the documentation but this course is very practical so we’ll be using things that you’re gonna come across quite a bit all right now it’s a relational database because you can relate data to each other so here’s an example of maybe an e-commerce site database where you have
Certain fields for instance we have users okay and then we have orders we have order items products merchants countries and you can see that there’s relationships between these tables and in the users table we have an ID now in relational databases you have something called a primary key which is basically
The unique identifier or key in your table so you don’t want to use something like name for your primary key because there might be more than one user with the same name so the ID is always going to be unique and what we can do is create another table such as orders and
Create what’s called a foreign key okay so in this case we have user underscore ID and then that user underscore ID will be linked to the primary key of the users table so that way we can create a relationship between those two tables you might want to make a query where we
Get let’s say the full name the email and maybe the order status okay oh the order ID or something like that so we can actually do what’s called a table join and we can get we can query data from multiple tables and it can be more
Than two you can do you know three four whatever different tables and you can combine that data alright so I’ll show you how to do that in a little bit alright so let’s talk a little bit about getting set up in installation so locally you can install a standalone
Server of MySQL this is what I’ll be running on my Mac but you can also install software Suites like xampp or MAMP which they come with an Apache web server PHP which is a programming language MySQL and some other stuff as well so you might want to look into that
And then you also have the option of using docker or something like docker where you can use virtualization so for instance you can create a docker container with MySQL running inside of it which is much more advanced and beyond this tutorial and not something I would suggest if you’re just starting
Out with this stuff now as far as production it really depends on what hosting solution you’re using if you’re using something like let’s say Hostgator or Bluehost or something those those services offer cPanel and they actually have MySQL pre-installed so all you have to do is go into cPanel
And create a database and you can do it all graphically alright if you’re using a solution like let’s say digitalocean which is which is cloud hosting they pretty much just give you a terminal or give you a Linux container and you access it through a terminal in that
Case you would install MySQL using whatever package manager that Linux distribution uses alright so Berta product production it varies depending on what you’re using as far as a hosting solution but in this video we’re mostly focusing on SQL itself within MySQL so we’ll be dealing with a local server
Alright now as far as managing your server or managing your databases there’s there’s different ways to do this so with MySQL you get a shell program that you login to through a term and our command line we’re gonna be working with that at first you should definitely
Know how to log in and how to you know make simple queries and stuff like that you also have desktop tools such as MySQL workbench which I’m actually going to switch to about halfway through just to give you an example of a different tool you also have web-based tools in
Fact if you install xampp and I believe WAMP and MAMP also come with a tool called phpMyAdmin where you can log in to a to the program through your browser your web browser and you can actually manage your database from there in a graphical interface all right so enough
Talk guys let’s go ahead and jump in and let’s get started with MySQL alright guys so we’re gonna get started now Before we jump into MySQL I want to go over the download and installation I already have it installed but just in case you don’t if you want to get the
Standalone version you can go to MySQL comm slash downloads and it doesn’t matter if you’re on Windows or Mac and you want to go down past this commercial Enterprise version down to the Community Edition and click on this link here now from here you’re gonna want to download
The community server so if you click download here it’ll take you to a page like this it already pre selects Mac for me because I’m on a Mac and you want to download this dmg art archive so just click download here once you do that just double click on the icon go through
The steps click Next it’ll ask you to put in your root password because you’re going to have a user with the name of root and you need to add a password for that user alright if you’re on Windows same thing it’ll just choose Windows here and you can
Download either the zip here or click this button and go to this page and download the MSI installer so it’ll be just a graphical installer same idea click Next add your root password and you should be all set now we’re also going to be using
A tool called MySQL workbench so if I go back to downloads back to community downloads you’ll see MySQL workbench right here so if I click download I can just go ahead and download and install that and the same thing just click Next and it’ll set it up on your system
Okay so that’s how you can download and install MySQL now if you want to use something like xampp you can do that this comes with apache maria DB is basically like a superset of mysql so it has everything MySQL has plus some other stuff or a drop in whatever you want to
Call it so you can use this if you want there’s other there’s other suites like this for instance MAMP lamp and i believe all those come with mysql as well so it’s up to you on what you want to use now once you get MySQL installed
You’re gonna need to know the path where it’s located on your machine now I have a cheat sheet just here and I have the link to this in the description and if you’re on a Mac it’s gonna be in if you install the standalone version it’ll be
In the US are local MySQL /bin okay that’s where the actual MySQL binaries gonna be if you’re on Windows it’ll most likely be in Program Files MySQL whatever the version is and then bin and then if you’re using xampp mysql will actually be in the xampp folder okay if
You’re using Linux it depends on the distro you’re using so you need to find the path to MySQL now once I go into my terminal here if I do MySQL – – version it works for me but if you just installed it it’s probably gonna say command not found and that’s
Because you don’t have the MySQL command in your path alright if you go to the the actual bin folder and you run it it should work however you probably want it so you can run it from anywhere on your machine now for Mac I have it right here
In the gist you can do one of two things you can run this command which will add it to your current session so that you can use the MySQL command now but if you close the terminal and come back it won’t work if you want to add it
Permanently you need to just add it to this dot bash profile this this hidden file right here so you could actually copy this command and just go ahead and paste that in here and run that alright I’m not gonna run it because I actually already have it there in fact I’ll show
You if I do a cat command which will just preview a file and I’ll do bash underscore profile you can see that I have my my SQL path right here so it’ll just add it to that file now if you’re on Windows it’s a little different I have a link
Right here that you can go to that will kind of tell you what to do you just need to go to properties advanced environment variables system variables and then path click Edit and then add your path which will look something like this make sure that it’s the correct
File correct path with the correct version here all right and then you should be able to access the MySQL command from anywhere so once you do that once you have it installed you have your path set up you can go ahead and log in right in the terminal ok right in
The shell so we’ll do MySQL – you for a username we’re gonna use the root user and then – P to let it know that we want we have a password for this user to put in okay then it will ask for the password you want to put your root users
Password not your system not your Mac or Windows password and then you should get logged in sorry I’m just gonna minimize that and you can tell we’re logged in because of all this stuff and because we now see MySQL and then the prompt right here so we can clear this with ctrl L
And what I’m gonna do is I’m gonna do a few things within the shell here just to kind of show you how it works and then I’m gonna jump into MySQL workbench because it’s a lot easier to read it’s a lot easier to write in and I think it’ll
Just be a better experience than working in the shell but from here what I do want to do is create a new user because right now we’re logged in as root and when you create a new database for a new application you probably want to have a
Specific user for that database so we can say create user and inside quotes I’m gonna use Brad as my user name but you could use whatever and then we want to do at and then another set of quotes localhost okay now we want to add a
Password to this user so I’m going to say identified by and then a password and then a semicolon so I’ll just do 1 through 6 okay so just doing that will create a new user for us now take note of the convention where I use these caps for create user and identity
I’d buy if we go back to the cheat sheet which is right here you notice that it’s just a common convention throughout all the queries here drop user create database drop database create table it’s all caps even when we do the selects the from and the where it’s just the common
Convention for SQL so you want to get comfortable with that type of syntax or that type of convention you don’t have to do it I mean it will still work if you do all lowercase but it’s a lot more readable and it just you can see exactly what’s going on you’re selecting
Something from something all right so I’ll be using that that syntax so let’s jump back in here and close that up now if we want to see the users that we have we can actually do a select so we can select user it’s also select host from
And then MySQL dot user semicolon and that will show us our users we have our root user Brad and then the system things here which we don’t need to care about all right now I’m gonna clear this up and I want to give this user some privileges because right now they can’t
Really do anything I want to basically make the Brad user an admin so that so he can create new databases update data in other databases stuff like that so full access and you can go to the documentation if you want to see like the specific privileges you can add I’m
Just granting all privileges so I’m going to say grant all privileges on and I’m going to do asterisk dot asterisk and then two and then the user I want which is going to be Brad at a local host and semicolon alright so this will grant all privileges and once you once you do
This you want to actually flush privileges which will clear the grants table so we want to do flush privileges like that all right and if we want to check the privileges for a certain user we can do show grants for and then the user so say Brad at localhost and now
You can see all the stuff that that user can do okay so I’m going to clear this up and then we can actually exit out of MySQL so I’ll just do exit and that takes us back out to the terminal here the command prompt and I’m gonna log
Back in as Brad so instead of using root here I’m just going to use Brad and enter that password and now I’m logged in as that user so you can switch users just like that so let’s create a database I’m gonna go ahead and say create database and I’m gonna call it
Acme so now if you don’t put a semicolon it’ll go on to the next line like that because you can do multi-line statements so just put a semicolon if you forget and it’ll run it alright now if we want to show our databases we can simply run
Show databases and now you can see we have that Acme database now in order to use that database we actually have to specify use and then the database name so we’ll say use Acme ok and it says database changed so we’ll clear that up now I’m gonna
Jump into workbench pretty soon but I just want to do a just to create here just to add a table because right now there’s no tables in fact we can say show tables and we get empty set ok so I’m going to go ahead and do a create
Table I’m gonna call it users and I’m gonna do a multi-line statement just so it’s more readable so I’m going to open up parentheses and hit enter and then in here we want to start to put our fields so I want an ID which is going
Be an INT an integer and I want it to be auto increment so Auto underscore increment in comma now what auto increment means is I want it so that the ID is going to be unique and it’s going to get added automatically and it’s going to increment automatically so the first
User we and so we insert will be ID one next one will be two next one will be three and so on and it’ll just keep it’ll keep incrementing alright that way we don’t have to even worry about inserting an ID so that’s our ID let’s
Do a first name now I like to use underscores to separate the words in my fields but you could do like like that or even like that but usually in relational databases I’ll do it this way and then this is gonna be a VAR car which will be let’s do 100 and
Length now the max 4 of our car is 255 just to let you know and some people will always put 255 I like to I like to keep it at a you know reasonable I think 100 is good for a first name and then let’s do last name so do 100 for the
Last name let’s do email 275 ok password now passwords are usually should always be hashed are encrypted so they could be very very long so I’m going to do 255 okay let’s do location say 100 and let’s do a department do say 75 let’s do an is admin say that
This application we’re building you can have admin users this is going to be a tiny hint which is used as a boolean and it’s going to be just one character so it can we want it to either be a 1 or a 0 1 if it’s an admin 0 if not and then
Let’s do a register date which I’m gonna make a date/time field okay now the last thing I want is to is to specify a primary key and that’s gonna be the ID so we want to say primary key and then in parentheses whatever field we want
Which is gonna be the ID all right and then last thing is just to close everything and put a semicolon and we’ll run that we get query ok good so now we can actually do show tables and you can see that we have one table we have users
Ok it’s it’s completely empty we don’t have any actual users but we have the table there and just to let you know if you wanted to get rid of a table you could just do drop table and then whatever the table name so you could do
That also if you want to click delete a whole database you could do drop database and then Acme so we could run that as well alright but what I’m gonna do now is is just exit from this whoops I felt that wrong so we’ll exit from that and I’m gonna actually open up
MySQL workbench alright now once you open workbench you should automatically see your local instance and by default MySQL is going to run in port 3306 and you can see it’s gonna be the root user but if you want to log in as a different user such as the Brad user I created I
Could say edit connection and I could just change this to Brad and then it will prompt me for that password but I’m just going to log in as root here so I’m going to double click and it’s going to ask me for the root password
Okay so it’s going to take us to screen like this and there’s a lot to workbench I’m not going over like the the actual platform or just using it to to make our queries more clear and the results and stuff like that but this is a query
Window so we can write queries in here just like we were doing in the terminal if we go over here to the side and we hit schemas you’ll see that we have our Acme database okay and in workbench they’re called schemas and if I hit the
Arrow here and go under tables we’ll see the users table if I go under columns we’ll see all the columns that we created all right so what we need to do is is we actually need to select a database or a schema to use so we’re gonna choose right click here and we’re
Gonna say set as default schema okay now we don’t have any data in here yet so I want to I want to add some but just to show you we can do a simple select so I’ll select all from users now to run this we can either hit this lightning bolt
So that’ll run it or we can do control enter or control return and that will also run it so that’s what I’ll be doing and you can see that nothing comes up we see basically an empty table we have all of our keys here and I apologize that
These are small I couldn’t figure out how to make this font size bigger the results though do have a bigger font size so you will be able to see that and then down here you’ll see the action output so these green check marks means that it went through okay nothing
There’s no errors if something happens if something goes wrong then it’ll give us a message like let’s say I don’t know from ABC and run that then we get an error and it just gives us an error code that says ABC does the table name doesn’t exist all right so it gives you
A little log down here so let’s clear that up and let’s insert a record or a row so we already have the Acme database or schema selected so I’m going to do insert into users and then in here we want to put the fields we want to add so
Basically everything except the ID because the ID Auto increment so we don’t need to add that so first name last name email password location departments is admin and registered days so we want those fields added so I’m gonna go after this parenthesis here and I’m gonna go ahead
I’ll just Conan the next line and save values and then another set of parenthesis with our values now if you’re putting in a string actually I’m not gonna use my name let’s do John you want to put quotes around okay so John for the first name doe and make sure
That this order is the same as this order so John Doe next is email so we’ll say John Gmail com password I’m just gonna do one through six although you always want your passwords encrypted if you’re building a web app or anything like that if it’s a password you want it
To be hashed and encrypted and secure you never want to put plain text in a database for a password so location I’m gonna say Massachusetts Department let’s do development is admin we’ll put a 1 and then register date we could put a date string here if we wanted to but
I’m actually gonna put in now with some parentheses which is a function that we’ll put in the current date and time okay so that should work let’s run it with ctrl enter and we get a green check down here I know this is small sorry about that but it says that it was
Inserted 1 rows affected and now let’s do a select select all from users over on that and we get our result ok and it’s nicely formatted now you can save tabs with queries so you can save them you can have as many tabs as you want
I’m just going to be working in the same tab just for just to make it easy but if you want to save like long difficult queries you can do that there’s a lot you can do in this platform I might do a tutorial on it actually but let’s go ahead now and
Let’s add some more data to work with now I’m going to show you how to add multiple records but I’m not going to type it all in just because it’s so much so if we go to the cheat sheet here or it says insert multiple rows I’m gonna
Grab this and this will insert five more users so if I copy that go back in paste that in it’s just the same thing insert into users and then all the keys and then we can just have multiple values so we have values with our parentheses we
Have one user and then a comma and then another set of parentheses with another user comma another set of parentheses so we have just a bunch of users okay so you don’t have to do like five different inserts if you want to insert five users or five records so we’ll go ahead and
Run that and we get a green check so now let’s do a select you could also do this you can right-click users and say select rows and it’ll show you them as well all right so you can do that and you can see now we have a bunch of users here that
We can deal with and they all have different locations some are the same same thing with the departments so we can kind of search by that passwords are all one through six so let’s look at selecting some more so we know how to select all if we want to select just the
First name let’s say first name last name we don’t need Acme dot users since we selected that database so that will just give us just the first and last name now let’s say we want to get let’s do select all from users and I want to specify a
Where clause okay so this is called a where clause we want to basically narrow it down and I’m going to narrow it down to where their location is equal to Massachusetts okay so if I go ahead and run that notice it only gives me back three
Results okay three out of the six users and it’s only the users that are from Massachusetts okay now if I wanted to get the users that were just from Massachusetts but also only in sales I could put multiple multiple conditions here so I can say and I’ll say and where
Sales is equal to not sales equal to Department Department is equal to sales if I run that now we get only the users that are from Massachusetts and that are in sales now we can also use operators like greater than and less than so let’s
See so with what we have to work with let’s say select users where is admin is greater than zero so if we run that we’ll get any his admin that’s greater than zero obviously we only have one so that’s what’s going to show up but we can use greater than less than greater
Than or equal to less than or equal to and so on now I’m going to get back to some more stuff we can do with select like concatenating and using like and stuff like that but I want to show you how to delete and update data as well
Before we get into that so let’s clear this up and let’s say we want to delete a row so we have six users one through six let’s do delete from users now it’s really really important when you do an update or a delete that you make sure
You you add the where clause because you can end up deleting all your records or you can end up updating all your records so make sure you do that so we’re gonna say we’re and from for the most part you’re probably going to use your primary key your ID so we’ll say we’re
ID equals six so I’ll go ahead and run that we get a green check so let’s do a select actually I’ll just say select rose and now you can see that the user with the idea of six is now gone so let’s update a user let’s say
Fred here wants his email updated to let’s say Freddy at gmail.com so we can say update we’ll say update and then the name of the table so users and we want to say set and then the field we want to set so email let’s set email to Freddy
Freddy at gmail.com and this again very important to put the where clause otherwise all of our users are going to get their email set to Freddy at Gmail so it’s very important to have that where clause so we’ll say where ID equals to because that is the Fred user
So we’ll run that and select our rows again and now you can see that his email has been updated okay so basic crud create read update and delete is pretty simple and again I have all these queries and the gist in the description so it’s not like you have to remember
All this stuff so let’s say we want to we want to add a new column here right so we want to add let’s say an age so we can do that with the alter table command so let’s do alter table and then the name of the table and then I’m gonna say
Add and I want to add an age and we need to set a type for this so let’s save our car and let’s do three okay so we’ll go ahead and run that now if I select my rows you can see that age has been added
And they’re all no okay I really haven’t talked about null and null is basically just empty okay it it’s a field that is is just empty and you can set certain columns so that they’re not null meaning they there’s they can’t be null it’s not possible but for the most part you’re
Going to allow null in in columns all right so let’s say we want to modify call them like let’s let’s change this age from a var car to an int so we can say alter table users and instead of ad I’m gonna Hugh’s modify column and I believe this is different if you’re
Using like postgrads or something I think it’s like alter column or something like that we’re gonna say modify column age and we’re gonna set it to an int of 3 okay so now I’ll go ahead and run that and it should just give me the same result but now the age is an
Int now we can also edit stuff from here update stuff from here we don’t have to use the the query the query window up here oh I didn’t realize it was opening new tabs every time but let’s say we wanted to add ages here I could just
Double click let’s do let’s say 20 go here 23 and obviously this is just we’re able to do this because we’re in MySQL workbench but that’s what these programs are really good for it’s 40 all right so if we hit apply that should run that query and change these values so let’s
Hit apply okay so it’s going to ask us to review the SQL script to be applied on the database and you can see it’s just a bunch of updates its setting age to 20 and then 23 34 whatever so let’s apply okay so it looks like that one
Okay now if we run the Select again you can see that the ages are now these numbers here so we can we can update stuff right from within the the table here so let’s see we only added a new field we modified it let’s go back to
Some of the stuff we can do with select now if we want to order things in a certain way we can use order by so let’s do select all from users and let’s do order buy and let’s order by I’ll say last name now we can do either ascending or descending so we
Can do ASC and now if we look at our last names you see that starts doe is at the top here Watson is at the bottom and if we want to do descending we can do de SC and run that now Watson is at the top
And doe is at the bottom okay so pretty simple another thing we can do is we can concatenate columns for instance we have a first name and a last name field let’s say that we wanted to create a result where we had let’s say a just name that
Had first and last name so we can use concat for that so we’ll say so select concat and inside here we’ll do first name comma and then I’m going to concatenate so we’re going to select that and let’s also do what we have to do and as and then whatever we want to
Call this field or this column which we’ll call name and then let’s also select Department we can select any other fields we want as well and we’ll say from users so if we run that we get this one column now called name that has both the first and last name and we get
The Department because we added that in there as well all right now the next thing I want to show you is if we want to get distinct rows meaning let’s say we only want one user from each location we want distinct locations we don’t want two results with Massachusetts or two
With New York so we can do select distinct location from users and is just going to show us just the locations okay so for some reason you needed in your application to get just the available cities or you know just the the locations of the users
You could run this query and get them without having them repeat because if you just say get location then you’re gonna get repeat locations and you might not want that so that’s what distinct is is good for now we can also select ranges using between so let’s say we
Want to select all from users we want to use a where clause here and we can say where age is between and we’ll do 20 and 25 so if I run that we get two users put your 20 and 23 we’ll change this to 30
Now we get all users between 20 and 30 okay so now we’re going to move on to like and like is used for a full-text searching for instance if you’re if you want to search a blog post for a specific word or something like that that’s what this is good for so I’m
Gonna do select all from users where and I’m gonna say where a department like okay I want to use the like keyword here and we want to use % so I’m gonna say D percent now what this means is it’s gonna match anything that starts with a
D okay so any any value that’s inside of Department that starts with a D this should match so let’s go ahead and run that and we get development design design development so obviously sales doesn’t match this query here and we can make this go further by saying let’s do de eV
So obviously well let’s do de so that’s going to match development and design but obviously the we’re on that we’re just gonna get development okay now if we want to search the end of something we could do percent T so this means just whatever
And then ending with a T so if we go ahead and run that we’re gonna get development because it ends with a T now if you want to assert most of the time you’re gonna have percent and then something percent so if you want to search for whoops percent if you want to
Search for a word or something this means that anything could be before and anything could be after it so we’ll do like I don’t know let’s do Opie and run that we’re gonna get development because there’s an Opie in development if we do es and run that we’re gonna get
Both design and sales because there’s an es in both of those and it doesn’t matter if it’s at the beginning end or middle because of how we put these percent signs okay so hopefully that makes sense now at the same time we can do not like which will just give us the
Opposite so if I run not like es we’re gonna get development because that doesn’t match that now another thing we can do is we can use in two to use lists so let’s say we want to get all the the users that are in design and sales so
We’ll go ahead and select all from users where and we’re going to say we’re department in and then after in we want to open up some parentheses and we can put in comma separated values of the departments we’re looking for so let’s say design and let’s put a comma here
And let’s say sales okay so we’ll go ahead and run that and it’ll give us every one in design and sales now we could just do where departments equals design and department equal sales that will give us the same result but imagine if we’re searching you know ten
Different departments so that that gets to be really long and messy where with the in clause we can just stick the all inside here and a comma-separated value list so next thing I want to talk about his indexes so indexes are used on columns and tables to speed up queries
And find things more quickly and efficiently you can almost think of them as an index in a book okay primary keys like our ID are indexed but we can add custom indexes on other fields as well and you want to put indexes on fields that you’re going to
Be searching by a lot within your whatever it is your application now if we go to on the side panel here users and we look under indexes we’re gonna see our primary key as our index okay if we look down here you can see that it’s the column ID and that’s that’s indexed
As a primary key but let’s say we have an application where we’re going to be searching by the location quite a bit so in debt adding an index will allow that to be more efficient more you just be a faster search so what I’m gonna do is
Add an index onto the location field so we can do that by using Create index and then we name it I’m going to call it L index so location index and then we can just do on and then the table name which is users and then inside parentheses the
Field that we want to add it to so location so if I go ahead and run that we get a green check down here and if I go and I reload this if I click this reload button you’ll see under indexes we now have the L index and if we look
Down here you’ll see that it’s the location column okay so when we search by location it should be more efficient now if you want to remove an index you can easily do that by doing drop index and then the name of it which is L index
On users so we’ll run that okay if we reload this again now you can see that that index is gone so you really want to examine what fields are going to be searched on what what queries are you going to make and add your index is based on that okay
Which can be a science in itself making a database more efficient so now what I want to do is start to look at foreign keys I want to look at relationships between tables so I’m going to create a new table up to this point we’ve been working with just the users table so
Let’s go ahead and I’ll just I’ll just type this out let’s say create table and we’re gonna create a table for our posts all right and I’m just gonna put this on a new line here so create table posts let’s add an ID which is an int and we
Want to do auto increment and this stuff will actually pop up in the intellisense it’s not uppercase but that’s fine let’s do user ID underscore ID now this is gonna be an int but this is going to be our foreign key okay so what I mean by
That is this is going to correspond to the the ID field in the users table so that we have a link between posts and users so it’s also add a title for our posts which is gonna be a VAR char and title we’ll say 100 and then we’re gonna
Want a body now the body could be more than 255 characters so we don’t want to use var car you want to use text which I believe has a max of 65,000 something like that okay we’ll put a publish date so publish date I’m going to use
Date/time but I also want to introduce you to defaults now you can set a default value for a field so I’m gonna do default and we have actually let’s do upper case here just to stay consistent so date time and then default and there’s something called current timestamp that we can use
Okay now current timestamp is sort of like using the now function except where we’re putting it in when the field one that when it’s created and we don’t actually have to add the publish date ourselves it’ll get added automatically okay so we can use a default we could use a default of
Anything but there’s a specific current timestamp that’ll give us just that now we want to assign a primary key just like we did for our users table and the primary key is gonna be the ID but we also have a foreign key in this table
Which is user ID so we want to specify foreign key I spell foreign foreign key and the foreign key we want is user underscore ID and we have to specify the reference what what is this key reference to in terms of its related table which is the user’s table so we
Want to add references and we’re gonna reference the user’s table and the key the primary key is the ID okay so we’re basically linking this to the ID on the users table so hopefully that makes sense let’s run this and now we should have two tables if I reload this and we
Look over here under users where’s all right here so posts columns we have all of our columns good so now let’s add some data to our post table to work with so I’m gonna actually grab this from the gist that I have and it’s right here so
It’s just a create table not a create table I’m sorry we want this we want to add the data it’s just an insert so we’re gonna insert the user ID the title and the body we don’t need to insert the ID it’s auto increment and the publish
Date has a default of the current timestamp so we don’t need that either we just need these three things so let’s go back and paste that in so it’s just going to add you know post one so this would be the user ID of one title body user ID of
Three title body and so on so we’ll run that and now we can make a select select all from posts and there we go we have ten different posts here and this number corresponds to the user ID so now that we have this post table
Let’s do a join because if we want to get data from two different tables that are related we need to do what’s called a join and there’s there’s different types of joins there’s inner joins which will return rows when there’s a match in both tables we have left joins which
Will return all rows from the left table even if there’s no matches in the right table and then a right join which will return all rows from the right table even if there’s no matches in the left table and I know that that is confusing
It confuses the hell out of me when I was first learning it and it’s it’s kind of hard to explain so you might want to do a little bit of research on it but I noticed for the through my throughout my career inner joins or what I use the
Most so let’s go ahead and do a join so the idea here is to get the user first-name lastname along with their their posts and their published date okay because we have users associated with these posts so I’m gonna do select let’s say select I’m just gonna go on a
Separate line here so from the users table I want the first name I also want the last name from the users table and then from posts I want the title and let’s also get the publish date okay now we want to specify that we’re getting it
From users but we want to inner join just make this uppercase so from users and then I want to inter join the post table now we need to needs to know where to to kind of match these two tables and that’s with the foreign key okay they’re the primary key on the
Users table to the foreign key on the post table so we say on users dot ID which is the primary key of the users and then match that against the posts dot user underscore ID which is that foreign key that we created all right and then we’ll top it off with an order
By post dot title okay so hopefully that makes sense we’re choosing these fields from two different tables or we’re saying from the users but we’re also joining in the post table and we’re connecting them by the user ID and then we’re ordering them so let’s run that
And now you can see we get the first name the last name and the post of that user and the publish date okay so that’s how you can mix and match related tables now I’m gonna take it a step further I’m gonna create another table for comments
Now comments are gonna have two foreign keys they’re going to have a post ID because I need to be related to a post and also a user ID because a user left the comment so let’s do create table comments and let’s add an ID of an int
Auto increments and we’re going to add a post ID which is going to be an int a user ID which will be an int a body so a comment body which will do text and let’s do a publish date here as well so publish date is going to be date time
And we’ll also add a default here of current timestamp all right now we need to define our keys so we have a primary key of ID we have a foreign key of user let’s do post ID and we want to add references to the posts table and the
Primary key in the post table is the ID so we’re linking that as a foreign key all right and then we want to do foreign key once again except now we’re taking the user ID and let’s say references to the users table and the ID field okay so
We’re now adding two foreign keys onto this in this table so let’s run that and I’m gonna go back to my gist where I have an insert to add some comments so this is right here add data to comments table and we’re gonna run that
Okay so we’ll run that and then let’s do a reload over here and you’ll see we now have a comments table and if I want to query that table I can say select all from comments and there we go and notice that each comment has a post ID and a
User ID all right so what I want to do now is get comments and posts or the comments of a post so I’m going to do a select and let’s take comments we want the body from the comments and then I want the post title so post title
And we’re going to select from comments and I’m gonna do a left join of posts on post dot ID equals comments dot post underscore ID and then we’ll just do an order by and let’s order by the post title okay so if we run that let’s take
A look so we get every comment and then we get whatever the title of that post that that comment is connected to now here’s kind of a an example of the left join and the right join so this will give us all the comments that have or
All the posts that have a comment now if I were to do a right join let’s just change this left to right and run that now notice we have kind of an issue here it’s showing every post even if it doesn’t have a comment all right and
That’s you usually wouldn’t want to do that because it’s it’s I mean why would you if you’re trying to get comments why would you want empty comments because what it’s doing is it’s taking just all the posts as opposed to and even if it doesn’t have a match whereas if we did a
Left join it would only get posts that had comments that had a match all right so I know that’s a little confusing but in this case you would definitely want to do a left join okay now let’s join multiple tables let’s get the users first and last name the
Comment in the post title alright so I’m going to go ahead and let’s say select comments body we’ll just keep that we’ll keep that but let’s also do users dot first name and users dot last name and we’re gonna we want comments is basically what we’re trying to get here
But we’re bringing in other tables or joining in other tables so we’re gonna do an inner join here of posts on post ID equals comment dot post ID and then I’m gonna add another inner join of users on users dot ID equals comments dot user underscore ID
All right and that should do it so let’s run that looks like we get an error here I think I frequently what did I do I forgot a comma right here let’s try that okay so now what we’re getting is all the comments we’re getting the title
Of the post that that comment is on and we’re also getting the person that left the comment okay so this this is the beauty of relational databases is having everything in their own isolated table but we can easily join these tables together and we can combine the data and
We can make any queries we want based on those relations between the foreign keys and the private keys all right so hopefully that some of that clicks so now we’re going to take a look at aggregate functions which are pretty simple so if we want to like get the
Count of a certain you know certain field or something like that so let’s clear this up and let’s do count so we’ll say select count let’s count the IDS from users and this is just an easy way to count how many users we have so
If we run that we get 5 if we want to check how many posts you can run that we have 10 posts if we want to run it on comments we have 9 comments okay another thing we can do is max so let’s say we want to get them the oldest person
So we’ll say select max and then the field we want which is age and then we’ll say from users and run that and the max age is 40 we can also do min so if we want the youngest person we could do a min on age and we get 20
We can also do some if we wanted to for some crazy reason add all the ages together we get 146 okay another thing we can do is upper case and lower case so for instance we can say select it’s actually you case and L case so if we
Want to do you case first name and then let’s do L case for the last name from users and now see that the first name is all upper case last name is all lower case okay we can also do group by so I’m gonna go and say select age and I’m also
Gonna select the count of age so let’s say count age so basically I want to see how many people are of a certain age actually you know what we’ll do we just do a quick select real quick so from you know what let’s not do age that’s that’s
Kind of stupid let’s do on location since we have some people are from the same location so we’ll say select location and the count of location from users and then we want to add on group by location okay so if I run that what will happen is it
Gives us one column that has the location name the distinct locations and another that has the actual count of how many users are in that location so this can be very useful now we can also add a where clause if we want so let’s say we
Wanted to get say we’re a location let’s say we just wanted to find out how many how many users live in Massachusetts we could say from users trying to figure this out without looking at my notes so let’s say we’re location is equal to Massachusetts if I
Can spell my own state so if we run that then we just we can narrow it down to Massachusetts and see how many users actually are from there all right so I think that’s pretty much it guys we’ve gone through quite a lot everything that
I’ve done is in the gist inside of the description so don’t worry if you forgot everything we just did it’s all there for reference so if you want to just keep that aside and for when you’re dealing with when you’re dealing with SQL now I know that a lot of you guys
Are web developers and and we didn’t really do anything that has to do with programming languages so I want to just create a quick note j/s app and show you how we can implement MySQL and I do have a complete video on this with both the standard MySQL driver and something
Called SQL Lite which is in om an object relational mapper that kind of sits on top of MySQL and allows you to make queries without having to actually do selectfrom and all that it’s it’s much easier for instance you could do like you’d have a user’s model right this is
An actual SQL this is just pseudocode so you would have users dot find and that would select all of your all of your users so maybe you would pass in one or something like this ID one and that would get your the user with the idea of
One so in a lot of cases you’ll do self stuff like that it’s just kind of an abstract over your database but there are many cases where you would actually put SQL and especially if you’re using PHP like vanilla PHP with let’s say PDO you’ll be doing a lot of manual queries
Like we just learned so what I want to do is give you just a quick and dirty example how we can use MySQL and SQL queries within an ojs application and of course you could use PHP Python any language at all but this is just a really quick
Example using node express which is a web framework and the MySQL driver so I’m going to go ahead and just run and this is just an empty folder called node MySQL sample I’m going to run NPM and Nitz to initialize a package jason which looks like this it’s just a manifest
File and then i want to install two packages so i’m gonna say npm install and i want to install express which is our framework so that we can have a route and also MySQL so we’ll install those two things okay and you can see those got added to our package Jason so
Now we’re just going to create an entry point so index J s and in here I’m going to bring in Express and we want to require Express and then I’m also going to bring in the MySQL driver that I just installed so we’ll call that MySQL and
Then what we need to do is initialize Express and then we want to listen we want our app to listen on a pour let’s do 5,000 and then we’ll just put a arrow function here and we’ll say console.log and let’s just say server started alright so just that alone will actually
Run the server if we do node and then index dot JSP a we get server started I’m gonna cancel it with ctrl C and now I’m going to implement our database so I’m gonna create a variable here called DB set that to MySQL dot connection and that takes in an object with some
Parameters we want the host which is our localhost and we want our user which my user is Brad password so one through six and also the database that we’re using so Acme all right so that’s our DB variable and then we need to connect by calling DB dot
Connect all right now what I’m going to do is create a row using Express so we’ll say apt-get cuz we’re handling a get request and let’s do slash users since we’re dealing with the users table and this takes in they call back with a request in response and I’m gonna create
A variable called SQL so this is this will be our query so select all from users alright now we can execute this with DB query so we’re taking that DB object and calling the query method passing in SQL and that’s going to give us a call back with a possible error and
A result alright and then here I’m just gonna say if there’s an error then throw that error if I wanna do throw error if not then let’s res dot send to the browser the results so the data that we get from that query you know save that
Will run node index I know this is really quick and dirty server started let’s go to our browser now and let’s go to HTTP localhost port 5000 slash users and there we go so we’re pulling our users from the database so you can use the same exact
Queries that we’ve been using you can use in here if we want to just select a couple things like first name last name email from users and then let’s do like order by last name so same exact stuff that we were doing I just have to
Restart the server every time we make a change so if I reload that now we only get the first name last name and email and they’re ordered by the last name okay if we wanted to do joins we could do that in fact I’ll I’ll copy let’s
Grab this right here so I could literally just take this and put that right in here let’s see what did I do what’s wrong here it’s like comments body you know what I think we have to use back ticks here yeah let’s try that so if I save that and
Restart the server you can go back and there we go so we get the comment body the post title the first name and the last name so you can literally use any of the queries that we were using within here and you could do that with in other
Languages as well but as I said in a lot of cases you’ll use what’s called an ORM an object relational mapper like sequel eyes you spell its sequel eyes so instead of using the standard MySQL driver for nodejs you might use sequel eyes where it looks
More like let me give you an example let’s see try to find a good example here because you don’t write straight queries so you would initialize a sequel eyes instance and then you could do you just give me an example that’s on a kate user knit because you create models all
Right here so instead of doing like an insert into user or whatever is something like that we would create a user model and take that user model and call a method like create and then pass in the data we want to create like a first name and last name all right so
You would do that instead of writing out you know a manual insert into query now even though you’ll deal with this stuff a lot with in many different languages and frameworks and stuff you I think every developer at least every full stack or back-end developer needs to
Know the basics of writing you know straight-up SQL queries it’s just it’s just needed so you know even though you can might use this stuff you still want to learn how to write just regular SQL okay so I think that’s it guys this is this is a pretty long video so hopefully
You learn something from it whether you’re just getting into SQL or MySQL or if you’ve been using it for a while hopefully picked up at least something so if you did please leave a like and I will see you next time
-
Sale!
Wireless WIFI Repeater Extender Amplifier Booster 300Mbps
$29.99$14.99 Add to cartWireless WIFI Repeater Extender Amplifier Booster 300Mbps
Categories: Electronics, Wi-Fi Router, Wireless Wi-Fi Extender Tags: 300Mbps, 802.11N, Amplifier, Booster, Extender, mobile wi-fi booster, Remote, WIFI, Wireless, Wireless WIFI, Wireless WIFI Repeater, Wireless WIFI Repeater Extender, Wireless WIFI Repeater Extender Amplifier, Wireless WIFI Repeater Extender Amplifier Booster, Wireless WIFI Repeater Extender Amplifier Booster 300Mbps$29.99$14.99 -
Sale!
Full RGB Light Design Gaming Headset Headphones with Mic
$24.99$14.99 Add to cartFull RGB Light Design Gaming Headset Headphones with Mic
Categories: Electronics, Gaming, Gaming Headsets Tags: Design, Full, Full RGB Light Design Gaming Headset, Full RGB Light Design Gaming Headset Headphones, Full RGB Light Design Gaming Headset Headphones with Mic, Gamer, Gaming, Gaming Headset Headphones, gaming headset wireless, Headphone, Headphones, Headset, Light, Mic, Package, RGB$24.99$14.99 -
Sale!
Wireless BlueTooth Multi-Device Keyboard Mouse Combo
$39.99$19.99 Add to cartWireless BlueTooth Multi-Device Keyboard Mouse Combo
Categories: Electronics, Gaming, Gaming Keyboards, Keyboard Mouse Combos Tags: Combo, Keyboard, keyboard mouse combos, Mouse, MultiDevice, Set, WireKeyboard Mouse Combo, Wireless, Wireless BlueTooth Keyboard Mouse Combo, Wireless BlueTooth Keyboard Mouse Combos, Wireless BlueTooth Multi-Device Keyboard Mouse Combo, Wireless BlueTooth Multi-Device Keyboard Mouse Combos$39.99$19.99 -
Sale!
High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
$199.99$139.99 Add to cartHigh Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
Categories: Gaming, Gaming Chairs Tags: Adjustable, Chair, computer chairs, Desk, Executive, Gaming, Girl, Headrest, High, High Back Leather Executive Adjustable Swivel Gaming Chair, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar, High Back Leather Executive Adjustable Swivel Gaming Chairs, Leather, Lumbar, Office, Racing, Swivel$199.99$139.99 -
Sale!
Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
$29.99$19.99 Select optionsProfessional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
SKU: N/A Categories: Electronics, Gaming, Gaming Headsets Tags: Cancelling, Gaming, Gaming Headphones with Noise Cancelling Microphone, gaming headset, Headphones, Headset, LED, Light, Mic, Microphone, Noise, Professional, Professional LED Light Wired Gaming Headphones, Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone, Wired, Wired Gaming Headphones, Wired Gaming Headphones with Noise Cancelling Microphone$29.99$19.99 -
Sale!
Gaming Desk with LED Lights USB Power Outlets and Charging Ports
$349.99$249.99 Select optionsGaming Desk with LED Lights USB Power Outlets and Charging Ports
SKU: N/A Categories: Computer Desk, Gaming, Gaming Desk Tags: and Charging Ports, Charging, Desk, Desks, Gaming, gaming desk with led lights, Gaming Desks with LED Lights, Home, LED, Lights, Monitor, Office, Outlets, Port, Power, Room, Stand, USB, USB Power Outlets, White, Workstation$349.99$249.99 -
Sale!
Wired Mixed Backlit Anti-Ghosting Gaming Keyboard
$99.99$79.99 Add to cartWired Mixed Backlit Anti-Ghosting Gaming Keyboard
Categories: Electronics, Gaming, Gaming Keyboards Tags: Antighosting, Backlit, Blue, brown, Gaming, Gaming Keyboard, gaming keyboards, gaming keyboards and mouse, Keyboard, Laptop, Switch, Wired, Wired Mixed Backlit Anti-Ghosting Gaming Keyboard, Wired Mixed Backlit Anti-Ghosting Gaming Keyboards, Wired Mixed Backlit Gaming Keyboard$99.99$79.99 -
Sale!
Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
$119.99$59.99 Add to cartWireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
Categories: Electronics, Gaming, Gaming Headsets Tags: 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, ANC, Audio, Bluetooth, Cancellation, Ear, Earphone, gaming headset, Headphones, Headset, Hi-Res Over the Ear Headphones Headset, HiRes, Noise, Wireless, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Headphones, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headsets$119.99$59.99 -
Sale!
Wired Sports Gaming Headset Earbuds with Microphone
$19.99$9.99 Select optionsWired Sports Gaming Headset Earbuds with Microphone
SKU: N/A Categories: Gaming, Gaming Headsets Tags: Accessories, Earbud, Earphone, Earphones, Gaming, gaming headset with microphone, Headphones, Headset, IOS, Microphone, Sports, Wired, Wired Sports Gaming Headset Earbuds, Wired Sports Gaming Headset Earbuds with Microphone, Wired Sports Headset Earbuds$19.99$9.99 -
Sale!
150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
$49.99$29.99 Add to cart150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
Categories: Charging Stations, Electronics Tags: 150W, 150W Charging Station, 150W Universal Multi USB Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Stations, 150W Universal Multi USB MAX Charging Station, 16 Port MAX Charging Station, 3.5A, Charger, Charging, Fast, laptop charging stations, Max, Multi, Port, Stand, Station, Universal, USB$49.99$29.99
Slides – 1:00
Download & Install Info – 9:34
MySQL Path Info – 11:40
Shell Login – 13:48
CREATE USER – 14:43
GRANT PRIVILEGES – 16:36
CREATE DATABASE – 18:23
CREATE TABLE – 19:08
MySQL Workbench – 22:50
INSERT – 25:20
SELECT – 28:50
DELETE – 31:21
UPDATE – 32:05
ALTER TABLE – 33:11
Update via Workbench – 34:50
ORDER BY – 36:10
CONCAT – 36:50
DISTINCT – 37:58
BETWEEN – 38:49
LIKE – 39:25
IN – 41:40
INDEXES – 43:00
Table With FOREIGN KEY – 45:00
INNER JOIN – 50:24
Table With Multiple FOREIGN KEY – 52:30
LEFT JOIN – 55:00
Aggregate Functions (COUNT, MIN, MAX) – 58:46
GROUP BY – 1:00:18
Node.js & MySQL Example – 1:03:55
how can i have the slides ,please?
Please i've been trying to install faker in my terminal but I keep getting errors, what can I do?
Thank you
Awesome Video.Really great kickstart indept learning of mysql
Attaching chapters will be better😀
Thanks for the informative video. I have never worked with mysql or any database, I am learning the basics. Anyways this video will help me build on and keep learning.
Bread you have a somewhat, i don't know exactly, of a very effective way to put tech knowledge to brains! Thank you for this video!
please what i get, i need assistance
mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local server through socket '/tmp/mysql.sock' (2)
jason is my favorite data type
58:00 I wanted to ask why right and left and inner or outer but i realized its like logic and sets course i had at cs major
Great video. I am excited to develop and harness these various tech skills and technologies to better the world and myself. Thank you for your leadership in helping others and being responsible for the outcomes of our lives
I couldn't install MySQL, it had a requirement i couldn't pass (Virtual studio 2019, 2017 or 2015) just couldn't find them.
Hey man thanks for the tutorial on MySql. It was pretty amazing.
why you are not explaining where to find the root password how to find. i am first time hearing about it. like why ?
Very good tutorial, but what about example using in The real world. How do you search for a specific word!? Say you have 1000 products, and want to find just one product in The data base?
I've watched a 3 hour tutorial on MYSQL and have to say it was good, but I have learned more from this 1 hour tutorial a lot more because you are to the point, you don't repeat, you don't pad it out with irrelivance. Very well presented, quality material.
Loved it
after I enter this command = " echo 'export PATH="/usr/local/mysql/bin:$PATH"' >> ~/.bash_profile " I still need to renter the current session command after I terminate the terminal. is there something that I miss out?? please help..
On Mac it looks like they now want the $PATH to be in .bashrc instead of .bash_profile …. at least that worked for me
Thanks Brad. you are a game changer. please can you do a video on "deploying MySQL" tutorial. thanks will really appreciate
I struggled a lot with "WTF is this join stuff?!" – But Fireship made it really easy and intuitive to understand it:
https://youtu.be/Cz3WcZLRaWc?t=864
When I learn a Topic I watch multiple tutorials to gain different explanations and views on it.
Basically ist always the Same Pattern:
Fireship for general/broad overview
Your Explanations/Channel is great for getting a detailed overview of a more in depth functionality
and then there is Codeevolution/Freecodecamp for in-depth understanding which would overload you and make you loose the bigger picture if you only did that.
Thank you for being part of my learning journey, your ability to teach this stuff is incredible.
Hi,
I Greatly appreciate your tutorials @Traversy Media
resume 28:00
9:34
23:09
I'm struggling with clearing the entire screen with a shortcut prompt. How do I do that?
Do you know why when I try to add it to my PATH permanently it won't work, but the current session one will?
Viewers want to learn completely MySQL for free in one video? https://youtu.be/vHTvF1PvGeY
This video was SO HELPFUL. Very nice coverage of the basic info I needed, and huge props for the practical example at the end. Thanks so much!
amazing tutorial!
Nice Tutorial. Thanks…
For the insert into posts, im having an issue its saying cannot add or update a child row: a foreign key constraint fails
Thank you.
This channel is the best thing that ever happen to me.
thanks
59:17
laughed too hard at "If I can spell my own state"
Anyone else on a mac not able to use the command in the video to permanently add the mysql command to environmental variable? It works for the current session but when I try permanently, it doesn't set the variable for some reason
a very clear course ! the theory , the practice and a real life use case ! thank you brad for such a great content !!
Thank you
awesome tutorial, thank you!
I followed your videos. I can connect to server and i create database and tables. But unfortunately when I run my workbench it can connect to the server by checking the status, the problem I noticed is the displayed details is different, I can't find the option of administration and schemas to find my tables and database. It shows only the objection panel and session panel. How is it work?
Great video! Very helpful.
"mysql –version" *version shows up
"mysql -u root -p" *nothing happens, it keeps only running and runnning until I press ctrl + break to stop it
can anyone help?
great job! thank you
awesome video! Something I found interesting is how to select all you use the asterisk (*) which is the same as in CSS. So it amazes how they relate to each other even tho they're different type of languages.
Thanks Brad !!
Brad, I consider you to be the person who taught me everything. Thank you for all that you do.
This is awesome, Thank you very much, great course.