How to Install MySQL Workbench for DDL and DML Practice
If you only want to learn and practice SQL commands such as DDL (CREATE, ALTER, DROP) and DML (INSERT, UPDATE, DELETE, SELECT), you only need MySQL Server and MySQL Workbench. XAMPP is optional.
Step 1: Download MySQL Installer
-
Visit the official MySQL website:
https://dev.mysql.com/downloads/installer/ - Select Windows (x86, 32-bit), MySQL Installer MSI.
- Click Download.
- Choose "No thanks, just start my download."
Step 2: Install MySQL Server and Workbench
- Run the downloaded installer.
- Choose Developer Default (recommended for students).
- Click Next.
-
The installer will automatically select:
- MySQL Server
- MySQL Workbench
- MySQL Shell
- Other required components
- Click Execute to install all components.
- After installation, click Next.
Step 3: Configure MySQL Server
- Keep the default port 3306.
- Select Use Strong Password Encryption.
- Create a password for the root user.
- Remember this password.
- Click Next and complete the configuration.
Step 4: Open MySQL Workbench
- Launch MySQL Workbench from the Start Menu.
- A default connection named Local Instance MySQL80 may already appear.
-
If not, create a new connection:
- Connection Name: Local MySQL
- Hostname: localhost
- Port: 3306
- Username: root
- Click Test Connection.
- Enter the root password.
- Click OK.
Step 5: Start Practicing SQL
Create a Database (DDL)
CREATE DATABASE school;
Use the Database
USE school;
Create a Table (DDL)
CREATE TABLE student (
id INT PRIMARY KEY,
name VARCHAR(50)
);
Insert Data (DML)
INSERT INTO student
VALUES (1, 'Ram');
View Data (DML)
SELECT * FROM student;
Update Data (DML)
UPDATE student
SET name = 'Shyam'
WHERE id = 1;
Delete Data (DML)
DELETE FROM student
WHERE id = 1;