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.
Connecting to a server
- Open Workbench and click the + next to "MySQL Connections".
- Enter a connection name, hostname
localhost, port3306, usernameroot. - 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
| Point | Workbench (GUI) | Command line |
|---|---|---|
| Ease for beginners | Easier (visual) | Steeper |
| Browsing data | Grids, clicks | Text tables |
| Speed for quick queries | Good | Fastest |
| Works without a GUI | No | Yes (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, port3306. - 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.
