Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
MySQL + SQL · Lesson 139

MySQL Workbench Tutorial

In this lesson: Use MySQL Workbench — connect, create database and tables, run queries and export data — beginner walkthrough. In Hindi & English.

What is MySQL Workbench

MySQL Workbench is a free visual tool (GUI) for MySQL. Instead of typing every command, you can connect to a server, run queries, browse tables with a mouse, and design databases with diagrams. It is beginner-friendly while still powerful for professionals.

💡 Workbench = a graphical window for MySQL: connect, query, browse and design, all visually.

Connecting to a server

  1. Open Workbench and click the + next to "MySQL Connections".
  2. Enter a connection name, hostname localhost, port 3306, username root.
  3. Save, then click the connection tile and type your password.

Once connected, you see the schemas (databases) on the left and a query area in the middle.

Running a query

SELECT * FROM students;

Type SQL in the query editor, then click the lightning-bolt (Execute) button or press Ctrl+Enter. The results appear in a grid below, which you can sort, scroll and copy. Errors show in the output panel with a clear message.

Browsing tables

On the left, expand a database, then Tables. Right-click a table and choose Select Rows to see its data in a grid — no query needed. You can often edit cells directly and click Apply to save changes, which is handy for small fixes.

Designing visually

Workbench can model a database before you build it. Using an EER diagram, you drag out tables, add columns, and draw relationships (foreign keys) between them. Workbench then generates the CREATE TABLE SQL for you — great for planning.

Workbench vs command line

PointWorkbench (GUI)Command line
Ease for beginnersEasier (visual)Steeper
Browsing dataGrids, clicksText tables
Speed for quick queriesGoodFastest
Works without a GUINoYes (servers)

Use Workbench to learn and design; use the command line for quick work and on servers.

Common mistakes

  • Wrong connection details. Host is usually localhost, port 3306.
  • Forgetting to Execute. Typing SQL is not enough — click Execute or Ctrl+Enter.
  • Not clicking Apply after editing. Cell edits need Apply to save.
  • Expecting it to replace SQL knowledge. You still need to understand the queries it runs.

Summary

  • MySQL Workbench is a free visual tool for MySQL.
  • Connect with a name, localhost, port 3306 and your username.
  • Run queries with Execute (Ctrl+Enter) and see results in a grid.
  • Browse and edit tables visually, and design with EER diagrams.
  • Use it alongside the command line, not as a replacement for SQL skills.

Next, install everything in MySQL installation, or learn direct commands in MySQL CLI basics.

Frequently Asked Questions

What is MySQL Workbench?
MySQL Workbench is a free visual tool (GUI) for MySQL. It lets you connect to a server, run SQL queries, browse and edit tables with a mouse, and even design databases with diagrams — all without memorising every command.
How do I connect to MySQL in Workbench?
Click the + next to "MySQL Connections", enter a name, the hostname (usually localhost), port (3306) and username (root), then save. Click the connection and enter your password to open it.
How do I run a query in MySQL Workbench?
Type your SQL in the query editor, then click the lightning-bolt Execute button (or press Ctrl+Enter). The results appear in a grid below, and you can scroll, sort and copy them easily.
Is MySQL Workbench better than the command line?
Neither is strictly better. Workbench is friendlier for browsing data and designing databases visually, while the command line is faster for quick queries and works on any server, even without a GUI. Many people use both.
Can I design a database visually in Workbench?
Yes. Workbench has an EER diagram feature where you draw tables and relationships visually, then generate the SQL to create them. It is great for planning a database before building it.
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

Next topicFind Nth Highest Salary Your progress: 139 / 151 (92%) · Lesson 140 / 151 Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free