and select the proper version for Mac OS. Click on "Download."
Start Installation: Once downloaded, open the installer. You will be asked to drag the MySQL Workbench icon into Applications folder.
Finish Installation: Workbench should now be available in your Applications folder.
Section 3: Connect to MySQL Server through MySQL Workbench
Open MySQL Workbench: Open MySQL Workbench from the Applications folder.
Add Connection: Click on the '+' next to "MySQL Connections" to add a new connection. Give it a name (such as "Local instance") and keep the rest as default. Enter the password you set during MySQL Server installation for the password field.
Test Connection: Click on "Test Connection" to ensure everything is setup correctly.
Section 4: Create and Populate a Database
Now that you have MySQL Workbench connected to your server, here's how you create a database and tables and populate them:
Create a Database
CREATE DATABASE studentDB;
Select the Database
Create a Table
CREATE TABLE students (
student_id INT AUTO_INCREMENT,
first_name VARCHAR(40) NOT NULL,
last_name VARCHAR(40) NOT NULL,
email VARCHAR(60) DEFAULT NULL,
PRIMARY KEY (student_id)
Insert Data into
INSERT INTO students (first_name, last_name, email)
('John', 'Doe', 'email@example.com'),
('Jane', 'Doe', 'firstname.lastname@example.org');
View the Data in the Table
SELECT * FROM students;
You have now successfully installed MySQL Server and workbench, connected them, and run some simple SQL commands to create and populate a database. Be sure to continue practicing your SQL commands and experimenting with more complex database setups.
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (