Installing MySQL and Creating Databases | MySQL for Beginners

Alex The Analyst
31 Oct 202312:04

Summary

TLDRIn this MySQL tutorial series introduction, the host outlines the structure of the upcoming beginner, intermediate, and advanced lessons. The first lesson focuses on setting up MySQL, including installation and creating a database. The host also directs viewers to full courses on analystbuilder.com for in-depth learning and practice. The tutorial demonstrates downloading MySQL, installing it, and configuring it as a Windows service. The host guides viewers through creating a database using SQL script files, showcasing the basics of MySQL Workbench and setting the stage for future lessons on querying data.

Takeaways

  • 😀 The video is the first in a MySQL tutorial series, aimed at beginners.
  • 🎓 The MySQL tutorial series is divided into three parts: beginner, intermediate, and advanced.
  • đŸ’» The tutorial covers installation of MySQL and setting up a database for learning purposes.
  • 🔗 Links to full MySQL courses are provided in the video description, including a crash course and courses for different skill levels.
  • 🌐 The MySQL installer can be downloaded from dev.mysql.com/downloads.
  • đŸ–„ïž The tutorial demonstrates installing MySQL on a Windows machine, with instructions for other operating systems available.
  • đŸ› ïž The installation process includes selecting setup type, checking requirements, and configuring the MySQL server.
  • 🔐 A password is set for MySQL authentication, and the server is configured to start automatically at system startup.
  • đŸ—‚ïž The tutorial includes creating a database and tables using SQL script files, which can be downloaded from GitHub.
  • 🔍 The MySQL Workbench interface is introduced, showing how to execute SQL queries and view database contents.

Q & A

  • What is the purpose of the MySQL tutorial series mentioned in the script?

    -The purpose of the MySQL tutorial series is to teach the basics of MySQL, broken up into beginner, intermediate, and advanced levels, with the first lesson focusing on setting up MySQL and creating a database.

  • Where can the full MySQL courses created by the speaker be found?

    -The full MySQL courses created by the speaker can be found on analystbuilder.com.

  • What are the different types of MySQL downloads available as per the script?

    -The different types of MySQL downloads available are 'MySQL Installer Community' and 'MySQL Installer Web Community'.

  • What is the difference between 'MySQL Installer Community' and 'MySQL Installer Web Community'?

    -The 'MySQL Installer Community' is a larger download that includes the installer, while 'MySQL Installer Web Community' is a smaller download that retrieves the installer from the web.

  • Why might the speaker suggest using 'Developer Default' during the MySQL setup?

    -The speaker suggests using 'Developer Default' during the MySQL setup to install the necessary components without needing to configure advanced settings, which are typically unnecessary for beginners.

  • What is the requirement that the speaker encountered during the MySQL installation process?

    -The requirement encountered during the MySQL installation process was the Microsoft Visual C++ redistributable package, which needed to be downloaded and installed.

  • What authentication method does the speaker choose for the MySQL server configuration?

    -The speaker chooses the 'Password' authentication method for the MySQL server configuration, opting not to use the 'Legacy' authentication method.

  • Why does the speaker decide to start the MySQL server at system startup?

    -The speaker decides to start the MySQL server at system startup for convenience, ensuring that the server is automatically available without manual intervention.

  • What is the significance of the 'Parks and Rec create DB' file mentioned in the script?

    -The 'Parks and Rec create DB' file is significant as it contains the SQL script to create the database and tables that will be used throughout the MySQL tutorial series.

  • How does the speaker demonstrate the execution of SQL queries in MySQL Workbench?

    -The speaker demonstrates the execution of SQL queries by using the lightning bolt button in the MySQL Workbench query editor, which runs the highlighted code or all code in the editor window if nothing is highlighted.

  • What is the final step the speaker takes to ensure readiness for the next lesson?

    -The final step the speaker takes is to remove the SQL additions feature in MySQL Workbench to prepare for the next lesson, which will focus on learning the basics of SQL.

Outlines

00:00

đŸ’» Introduction to MySQL Tutorial Series

The video script introduces a MySQL tutorial series divided into beginner, intermediate, and advanced levels. The first lesson in the beginner series focuses on setting up MySQL by installing it and creating a database for learning purposes. The instructor mentions three comprehensive MySQL courses available on analystbuilder.com, tailored for different skill levels and interview preparation. The courses include practice questions and guided projects. The video then proceeds with a step-by-step guide to download MySQL from dev.mysql.com, selecting the appropriate installer for the user's operating system, and navigating through the installation process. The instructor chooses the 'Developer Default' setup type and encounters a minor issue with the installation path but continues with the installation. The video concludes with the MySQL installer's requirements check, emphasizing the need for the Microsoft Visual C++ redistributable package, which the instructor had to install personally.

05:00

🛠 Configuring MySQL Server and Workbench

The script continues with the MySQL installation process, focusing on configuring the MySQL server. The instructor skips the configuration for the router and samples/examples, as they are not essential for the tutorial's purpose. The server configuration involves selecting an authentication method, where the instructor opts for a password-based approach over the Legacy method. Despite a minor glitch with the password field remembering a previous password, the configuration proceeds with setting the MySQL server to run as a Windows service and starting at system startup. The video then demonstrates the completion of the server configuration and briefly touches on configuring additional components like samples and examples, which involve adding sample databases. The installation is finalized, and the instructor shows how to start MySQL Workbench and access the local instance. The video ends with a demonstration of creating a new query tab and opening a SQL script file to create a database, which is part of the tutorial's GitHub repository.

10:02

📊 Exploring MySQL Workbench and Database Creation

The final paragraph of the script describes the process of using MySQL Workbench to create and explore a database. The instructor navigates to the 'local instance' in Workbench and opens a SQL script file named 'parks and rec create DB' from a鱄慈 created folder. This script is used to create the database and populate it with tables and data, which will be used throughout the tutorial series. The video demonstrates executing the script to create the database and tables, and then refreshing the schemas to view the newly created 'Parks and Recreation' database. The instructor also shows how to open a table to view its data, explaining the structure of the 'employee demographics' table with columns like employee ID, first name, last name, age, gender, and birth date. The video concludes with a brief overview of executing queries in the query editor, highlighting the difference between running all queries in the editor and running only the highlighted query. The instructor expresses excitement for the upcoming lessons, which will delve into the basics of SQL queries.

Mindmap

Keywords

💡MySQL

MySQL is an open-source relational database management system (RDBMS) based on SQL (Structured Query Language). It is widely used for managing data in web applications and is known for its speed, reliability, and ease of use. In the video, MySQL is the central theme as the tutorial series aims to teach viewers how to install, set up, and use MySQL for database management. The script mentions installing MySQL and creating a database, which are foundational steps for beginners learning MySQL.

💡Tutorial Series

A tutorial series refers to a collection of instructional videos or lessons designed to teach a specific skill or subject. In the context of the video, the tutorial series is broken into beginner, intermediate, and advanced levels, each targeting different skill levels of MySQL users. The video script outlines the structure of the series and what viewers can expect to learn in each part.

💡Beginner Series

The beginner series is the initial part of the tutorial series designed for individuals who are new to MySQL. It covers the fundamentals of setting up and using MySQL databases. The video script specifically mentions that the first lesson is part of the beginner series, where the focus is on installation and basic setup, such as creating a database.

💡Database

A database is an organized collection of data, typically stored and accessed electronically using a computer system. In the video, the script discusses creating a database in MySQL, which is a fundamental step in learning how to manage data using this RDBMS. The database created will be used throughout the series for practical examples and exercises.

💡Installation

Installation refers to the process of setting up and preparing software for use on a computer. In the video script, the installation of MySQL is a key step that the tutorial guides viewers through. The script details the steps to download MySQL from the official website and the process of running the installer on a Windows machine.

💡MySQL Workbench

MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. It provides data modeling, SQL development, and comprehensive administration tools. In the video, MySQL Workbench is mentioned as the tool that will be used to manage and interact with the MySQL database after installation.

💡SQL (Structured Query Language)

SQL is a standard language for managing and manipulating relational databases. It is used for creating, updating, and querying databases. The video script implies that SQL will be the primary language used throughout the tutorial series to interact with MySQL databases.

💡Authentication Method

An authentication method is a process or mechanism by which a user's identity is verified by a system. In the video script, the tutorial covers the selection of an authentication method during the MySQL installation process, which is crucial for securing access to the database server.

💡Configuration

Configuration in the context of software installation refers to the customization of settings to suit specific requirements or preferences. The video script describes configuring the MySQL server, which includes setting up the server type, networking, and authentication settings to prepare it for use.

💡Sample Database

A sample database is a pre-populated database provided for demonstration, testing, or learning purposes. The video script mentions the option to install sample databases during the MySQL setup, which can be useful for beginners to explore and understand database structures and operations without starting from scratch.

💡Query Editor

A query editor is a tool that allows users to write, edit, and execute SQL queries. In the video, the MySQL Workbench's query editor is introduced as the interface where viewers will write SQL code to create and manipulate databases and tables. The script demonstrates how to use the query editor to run SQL scripts that create databases and insert data.

Highlights

Introduction to a MySQL tutorial series divided into beginner, intermediate, and advanced levels.

Installation of MySQL and creation of a database for learning purposes.

Availability of three full MySQL courses on analystbuilder.com for different skill levels.

Downloading MySQL from dev.mysql.com/downloads.

Selection of the MySQL installer based on operating system preference.

Explanation of the difference between MySQL Installer Community and MySQL Installer Web Community.

Installation process walkthrough, including setup type selection.

Dealing with installation path conflicts and requirements checks.

Installation of Microsoft Visual C++ redistributable package as a requirement for MySQL.

Configuration of the MySQL server with authentication method selection.

Setting up MySQL server as a Windows service with automatic startup.

Completion of MySQL installation and launching MySQL Workbench.

Introduction to MySQL Workbench interface and local instance connection.

Creating a new database using a SQL script file.

Explanation of the SQL script file content and its purpose in creating tables and inserting data.

Execution of SQL script to create a database and populate tables.

Demonstration of refreshing schemas to view the newly created database.

Preview of the 'employee demographics' table data within MySQL Workbench.

Explanation of executing SQL queries and viewing query results in MySQL Workbench.

Anticipation for the next lesson focusing on the basics of SQL queries.

Transcripts

play00:00

what's going on everybody today we are

play00:02

going to be starting our MySQL tutorial

play00:07

[Music]

play00:09

series now the entire MySQL series will

play00:12

be broken up into three smaller series

play00:14

we'll have our beginner our intermediate

play00:15

and are Advanced this lesson is the very

play00:18

first lesson in the beginner Series

play00:20

where we're going to walk through all of

play00:21

the beginner or the basics of MySQL

play00:23

today we're going to be setting

play00:24

everything up so we'll be installing

play00:26

MySQL and then creating our database

play00:28

that we'll use to actually learn my SQL

play00:30

now before we get started I wanted to

play00:31

let you know that I created three full

play00:32

MySQL courses over on analyst

play00:34

builder.com I built a crash course for

play00:36

MySQL for people who are going to be

play00:38

interviewing or taking technical

play00:39

interviews I also created a full MySQL

play00:42

course that's going to cover everything

play00:43

from the basics all the way to the

play00:44

intermediate level and then lastly I

play00:46

created an advanced course that's going

play00:47

to teach you a lot of the more advanced

play00:49

things that an analyst would typically

play00:50

use those courses are going to go really

play00:52

in depth and they're going to have a lot

play00:53

of practice questions along the way and

play00:56

we'll also have full guided projects in

play00:57

there as well I'll have links in the

play00:59

description to to all of those courses

play01:00

if you want to check those out now

play01:02

without further Ado let's jump on my

play01:03

screen and install my SQL and create our

play01:05

database all right so let's get started

play01:07

by downloading MySQL we're going to come

play01:09

right over here to dev. myql.com

play01:13

/downloads slster and I will have that

play01:16

link in the description so you don't

play01:17

have to write all that out but you

play01:19

should be seeing this page right here

play01:21

now we have to select an operating

play01:23

system I'm using a Windows machine and

play01:25

if you aren't if you're using Linux or

play01:27

Mac or something else it should populate

play01:29

at 4 you but if it doesn't just select

play01:31

this drop down and select your operating

play01:33

system next we have two different

play01:35

downloads we can install the MySQL

play01:36

installer Community or MySQL installer

play01:39

web Community this one is very small but

play01:42

then you actually do have to download

play01:44

the installer it just gets it from the

play01:45

web this one I'm going to download the

play01:47

actual installer it's larger but this is

play01:49

the one I'm going to do so I'm going to

play01:51

go ahead and select download it's going

play01:54

to ask me if I want to log in or create

play01:56

an account and I don't I'm going to say

play01:58

no thanks just start my download

play02:01

I'm going to save this in this desktop

play02:03

folder doesn't really matter where you

play02:05

save it we're going to save that and

play02:07

it's going to download it should be done

play02:08

in just a few seconds I'm going to go

play02:10

ahead and click on it and it's going to

play02:12

open it up when it's finished and we

play02:13

should get the interface or the UI for

play02:16

the actual installation for MySQL so

play02:19

here is the MySQL installer and first

play02:21

thing we need to do is choose a setup

play02:23

type now we're going to keep the

play02:25

developer default unless you really know

play02:28

what you're doing and you can select the

play02:29

server only the client only full which

play02:32

is literally everything my SQL has to

play02:34

offer or custom so we're going to keep

play02:37

this developer default just installing

play02:39

the things that we kind of need so let's

play02:41

go ahead and select next and for

play02:43

whatever reason on my computer it's

play02:44

saying this path already exists you

play02:46

probably won't get that but I'm just

play02:48

going to go ahead and select next and

play02:50

then I'll select yes it keeps doing that

play02:53

I can't explain why but it keeps doing

play02:54

that for me even though I've deleted it

play02:55

from my computer completely U but it

play02:57

just remembers it somewhere in its

play02:59

memory now the next thing we need is to

play03:02

check requirements now I just have this

play03:04

one it says I need to download this uh

play03:07

Visual Studio I'm not going to do that

play03:09

but on your screen you may have multiple

play03:11

multiple requirements typically you're

play03:13

looking at something like this Microsoft

play03:16

Visual C++ redistributable package what

play03:19

you need to do is download this all you

play03:21

have to do is Click download once you

play03:23

download and install that on your

play03:24

computer and then we go back all of

play03:27

those should be gone that's the one that

play03:28

I see the most when I'm actually working

play03:30

with these requirements I had to install

play03:32

it myself when I got this new laptop so

play03:35

go ahead and install that if you need to

play03:36

but if yours looks like mine we don't

play03:38

need this visual studio for what we're

play03:39

going to do so we're going to go ahead

play03:41

and select next it is giving us a prompt

play03:44

that we haven't satisfied all the

play03:45

requirements but that's okay we're going

play03:47

to go ahead and select yes as well now

play03:49

we're ready to install all of these

play03:51

things these are all things that myl

play03:53

wants you to install the most important

play03:55

are the server and the workbench but it

play03:57

does not hurt to have all these other

play03:58

things as well some of these connectors

play04:00

are also important so we're going to go

play04:01

ahead and

play04:03

execute this will take just a few

play04:05

minutes I'll skip ahead uh when they're

play04:06

all done but this should take just a few

play04:08

minutes and then we'll continue on

play04:10

installing my SQL so everything just

play04:12

completed and now we're going to select

play04:14

next and now we need to actually

play04:16

configure our product now really the

play04:18

only one that we actually need to

play04:19

configure is the server the router says

play04:22

we need to configure it and the samples

play04:23

and examples say we need to configure it

play04:25

as well but really it's just the server

play04:28

let's go ahead and select next

play04:30

now we're not going to change anything

play04:31

for this type and networking unless you

play04:33

know what you're doing with the port the

play04:35

X protocol Port uh we're not going to

play04:37

change any of this we'll go ahead and

play04:38

select next next thing we need to do is

play04:41

Select an authentication method I'm

play04:43

going to be using a password I'm not

play04:44

going to be using the Legacy

play04:46

authentication method so I'm just going

play04:47

to go ahead and create a password now

play04:49

for you and I keep getting this error

play04:52

and I can't explain why right here for

play04:54

you you should be creating a password at

play04:55

the bottom it's remembering my password

play04:58

somehow and I I really can't explain it

play05:00

but I'm going to create my password or

play05:01

check my password uh this is one that I

play05:04

already created uh before I deleted it

play05:06

off my computer but it's still there um

play05:08

so it's saying my password is still good

play05:11

but if you need to you should be

play05:12

entering a password and then confirming

play05:13

your password and saving it and then you

play05:15

should also be checking it as well and

play05:17

then we're going to configure this as a

play05:19

MySQL server as a Windows service I'm

play05:21

going to keep that checked uh and we're

play05:23

going to start the MySQL server at

play05:25

system startup I like that automatically

play05:26

being there I don't want to mess with

play05:28

that so I'm going to keep it as it has

play05:29

it we're going to go ahead and select

play05:31

next and the last thing we do is just

play05:33

need to execute this and then everything

play05:35

we put in there is going to actually go

play05:37

so let's run this and execute it and

play05:40

that's just finished so let's go ahead

play05:41

and select finish now it says

play05:43

configuration complete for the server

play05:45

but we also need to configure these

play05:46

other two let's take a look at these

play05:47

really quickly we're not going to do

play05:49

anything on this it even says we really

play05:51

don't need to do this we just need to

play05:53

click finish and configuration not

play05:55

needed next we'll do samples and

play05:58

examples and we can input our password

play06:02

and all this is really going to do is

play06:03

put in some sample databases for us in

play06:05

our database which if you want you

play06:07

definitely can do that uh I just

play06:09

connected that worked I'm going to hit

play06:11

next and execute and it's basically just

play06:14

going to put in a database or two some

play06:16

sample ones for you to look at and the

play06:18

configuration is complete you don't have

play06:20

to do that one but we'll see that in

play06:22

just a second we're going to select next

play06:25

and now the installation is completely

play06:27

done and we can start my SQL workbench

play06:29

after setup and start my SQL shell after

play06:32

setup now I'm not going to do the shell

play06:34

so I'm going to actually uncheck that

play06:35

and we're going to select

play06:37

finish now my SQL just popped up for us

play06:41

and this is exactly what you should be

play06:42

seeing now there's a lot of things in my

play06:44

SQL to learn and know how to do we're

play06:46

not going to be taking a look at all of

play06:48

that stuff today but in future lessons

play06:50

we'll walk through a lot of these

play06:51

different things that kind of correlate

play06:53

with different lessons or things that

play06:54

we're working on in my SQL the first

play06:56

thing that we're going to click on is

play06:57

right over here this is our local

play06:59

instance this is local to just our

play07:01

machine it's not a connection to you

play07:03

know some other database on the cloud or

play07:05

anything like that it's just our local

play07:07

instance we're going to go ahead and

play07:08

click on this so this is what you should

play07:10

be seeing right here this is where we're

play07:12

going to actually write all of our SQL

play07:13

code and I'll show you all this in just

play07:15

a second but this is where we can

play07:17

actually create our database and our

play07:18

database is going to go right over here

play07:20

on this left hand side this silicon one

play07:22

is actually a sample database it has a

play07:25

bunch of tables and Views St procedures

play07:27

functions has all these things in in

play07:29

here if you want to go ahead and mess

play07:30

around with that what we're about to do

play07:33

is create our own database that we're

play07:34

going to be using throughout this entire

play07:36

series both the beginner intermediate

play07:38

and advanced we'll use a lot of this and

play07:41

sometimes we'll import some other ones

play07:42

for different use cases but this will

play07:44

serve for most of what we're trying to

play07:46

do throughout this entire series now

play07:48

what I'm going to do is I'm going to go

play07:49

ahead and I'm going to say open a SQL

play07:51

script file in a new query Tab and right

play07:54

here it opened up to a folder that I

play07:56

already created this MySQL beginner

play07:57

series folder within it we have this

play08:01

right here the parks and rec create DB

play08:04

now in order to get this you just have

play08:05

to go to the GitHub and download this

play08:08

file that's all you have to do we're

play08:10

then going to open this file so let's

play08:11

click on it we're going to say open and

play08:14

what you're now seeing is basically the

play08:15

query editor this is where you can write

play08:17

your code now we're not importing a

play08:20

database we're actually creating it by

play08:22

running code now because this is the

play08:24

first lesson in the beginner series I'm

play08:26

going to assume that you don't know a

play08:27

ton about my SQL really all this is

play08:30

doing is creating the database name and

play08:32

then we're inserting a few tables into

play08:35

that database and then we're inserting

play08:37

data into those tables so this is all of

play08:39

our data that will go into these tables

play08:42

that we create we only have one two

play08:45

three different tables that we're going

play08:46

to be using so all you have to do to run

play08:49

this is click this lightning button

play08:51

right up here we're going to go ahead

play08:52

and execute this if we come down to the

play08:55

bottom and we pull this up this is our

play08:57

output this says six rows affected and

play09:01

we have a bunch of other things like

play09:02

create table create table insert insert

play09:04

create table insert into these things

play09:07

are all working perfectly so now if we

play09:10

go ahead and click refresh in our

play09:12

schemas with this refresh button right

play09:14

here this Parks and Recreation table is

play09:17

populated if we go under the tables we

play09:20

see all of these things so now that

play09:22

we've actually created our database and

play09:23

our tables that's really all we were

play09:25

trying to do in this lesson but I just

play09:27

want to open up a table really quickly

play09:29

show you what it looks like show you how

play09:31

we can run code and then in the next

play09:33

lesson we'll start actually learning how

play09:35

to query this data so let's go up to

play09:38

employee demographics we're going to

play09:39

rightclick and select rows limit 1000

play09:43

this is going to open up a new window

play09:44

right up here and it's going to say

play09:47

select everything from this database dot

play09:51

this table employee demographics and it

play09:53

ends with a semicolon now right down

play09:56

here we have this output window this is

play09:58

the actual data that sits in our table

play10:02

we have columns right here so employee

play10:04

ID first name last name age gender and

play10:08

birth date and then here are all of our

play10:10

employees on each row so these are all

play10:12

separate rows we have Leslie nope Tom

play10:14

haford and it goes on and on so this is

play10:17

all of our data the most important

play10:18

things to know when we're actually

play10:20

working with this and I'm going to zoom

play10:21

in is if we hover over this query right

play10:24

here and we run it we can select this

play10:27

execute which is this lightning bolt

play10:29

with this I we're going to execute this

play10:31

and it's going to run this because we're

play10:33

highlighted over it now if we have two

play10:36

queries let's say this one right here

play10:38

but let's change it to employee uncore

play10:40

salary so we'll do underscore salary

play10:44

let's say we want to query this table so

play10:46

now if we highlight over this and we go

play10:49

up and select the lightning bolt with

play10:50

the I now we're looking at a different

play10:53

table but if we select even if we're

play10:56

hovering over this if we select this

play10:58

button we're going to execute everything

play11:01

in this editor window so let's run this

play11:04

and now you can see at the bottom we

play11:05

have two outputs the employee

play11:07

demographics and the employee salary so

play11:10

this button is going to run everything

play11:12

in this editor window whereas if we

play11:14

select this lightning bolt with the ey

play11:16

we're doing everything that's just under

play11:18

where we have the cursor where we have

play11:20

it highlighted the very last thing that

play11:22

I want to mention is that right over

play11:23

here you may have this up and you

play11:26

probably don't want that we're not going

play11:27

to do any SQL additions in the series

play11:30

you can get rid of that by clicking this

play11:32

button right here so starting in the

play11:33

next lesson we'll have everything ready

play11:35

to go and we will start learning the

play11:36

basics of my sequel I hope you're able

play11:39

to follow along get everything set up

play11:41

how we have it on the screen I am super

play11:43

excited about this series I just I love

play11:45

SQL so I'm really really really excited

play11:47

to get started on this with you guys I

play11:49

will see you guys in the next

play11:53

[Music]

play11:57

lesson

play12:00

[Music]

Rate This
★
★
★
★
★

5.0 / 5 (0 votes)

Étiquettes Connexes
MySQL TutorialDatabase SetupBeginner SeriesSQL Crash CourseTechnical InterviewData ManagementDeveloper ToolsWorkbench GuideCoding BasicsDatabase Design
Besoin d'un résumé en anglais ?