Welcome to this comprehensive tutorial on MySQL and MySQL Workbench Installation and Setup on Windows! Whether you’re a beginner or someone looking to refresh your knowledge, this video will guide you through every essential step—from installing MySQL to creating databases and tables using both the command line (MySQL Shell) and the graphical interface (MySQL Workbench).
🔗 What You’ll Learn in This Video:
Install MySQL on Windows: Step-by-step instructions to get MySQL up and running.
Install MySQL Workbench: How to use this powerful GUI for managing databases.
Database Creation: Learn to create databases and tables using both the CLI and Workbench.
Basic SQL Commands: Create , Insert and retrieve data
Environment Setup: Configure MySQL for smooth usage from the command line.
All Queries used:
— Create a new database
CREATE DATABASE DemoDB;
— Switch to the new database
USE DemoDB;
— Create a table
CREATE TABLE Employees (
EmployeeID INT AUTO_INCREMENT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
Department VARCHAR(50),
Salary DECIMAL(10, 2)
);
— Insert sample data into the table
INSERT INTO Employees (FirstName, LastName, Department, Salary)
VALUES
(‘John’, ‘Doe’, ‘IT’, 75000.00),
(‘Jane’, ‘Smith’, ‘HR’, 60000.00),
(‘Mike’, ‘Brown’, ‘Finance’, 80000.00);
— Retrieve all data from the table
SELECT * FROM Employees;
— Create a database named “demodb2”
CREATE DATABASE demodb2;
— Connect to the “demodb2” database
USE demodb2;
— Create a table named “customers” with three columns:
— customer_id (an integer that automatically increases for each new customer),
— name (text up to 255 characters long),
— and email (text up to 255 characters long)
CREATE TABLE customers (
customer_id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255),
email VARCHAR(255)
);
— Insert two new rows into the “customers” table
INSERT INTO customers (name, email) VALUES
(‘John Doe’, ‘john.doe@example.com’),
(‘Jane Smith’, ‘jane.smith@example.com’);
— Retrieve all data from the “customers” table
SELECT * FROM customers;
Addition Notes:
=============
MySQL 8.0 and above requires the Microsoft Visual C++ 2019 Redistributable Package to run on Windows platforms. Users should make sure the package has been installed on the system before installing the server. The package is available at the Microsoft Download Center. Additionally, MySQL debug binaries require Visual Studio 2019 to be installed.
コメント