← Back to MySQL Course | Chapter 1: Introduction & Basics | Lesson 5 of 8

MySQL Workbench Overview

MySQL Workbench आपके database के लिए एक picture-based control room जैसा है, जहाँ आप questions लिखने, table plans draw करने और answers देखने के लिए click करते हैं।

MySQL Workbench क्या है?

MySQL Workbench official GUI client है: यह raw SQL को queries लिखने, schemas design करने, और servers administer करने के लिए visual tools में wrap करता है, जो हर command-line flag याद रखने से beginners के लिए ज़्यादा friendly है।

उदाहरण: What is MySQL Workbench?

sql
-- Workbench wraps this same SQL in a visual query editor
SELECT * FROM information_schema.tables;

⚠️ This is MySQL-specific syntax. It cannot run in the browser editor. Practice this on your local MySQL installation.

एक Database से Connect करना

एक connection बनाने का मतलब है server का hostname, port (default 3306), और आपका username/password एक बार enter करना, फिर इसे save करना ताकि भविष्य के sessions हर बार credentials दोबारा type करने के बजाय एक click हों।

उदाहरण: Connecting to a Database

sql
-- Connection details: host=localhost, port=3306, user=root
SELECT 1;

Query Tab

Query Tab वह जगह है जहाँ आप actually हाथ से SQL लिखते और चलाते हैं; lightning-bolt icon click करना आपके cursor के नीचे वाला statement execute करता है, और results नीचे एक scrollable grid में दिखते हैं, काफी हद तक एक spreadsheet जैसे।

उदाहरण: The Query Tab

sql
SELECT 1; -- run with the lightning-bolt icon in the Query Tab; results appear in a grid below

Visual Database Design

Workbench के Entity-Relationship (ER) diagrams आपको tables drag out करने और उनके बीच foreign-key lines draw करने देते हैं, जो अक्सर raw CREATE TABLE statements पढ़ने से एक टूटे हुए relationship को spot करने के लिए आसान है।

उदाहरण: Visual Database Design

sql
CREATE TABLE customers (id INT PRIMARY KEY);
CREATE TABLE orders (
  id INT PRIMARY KEY,
  customer_id INT,
  FOREIGN KEY (customer_id) REFERENCES customers(id)
);

Data Export और Import करना

CSV या एक .sql dump file में export करना machines के बीच data move करने या किसी teammate के साथ आपकी schema का एक snapshot share करने का standard तरीका है, और import करना उस process को reverse करके एक database restore या seed करता है।

उदाहरण: Exporting and Importing Data

sql
-- Table Data Export/Import Wizard exports to CSV or a .sql dump
SELECT * FROM customers;
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. गलत host या port से connect करना, क्योंकि default port 3306 है, और एक connection refused error पाना।
  2. Workbench में एक default database select किए बिना एक statement चलाना, ताकि table names न मिलें।
  3. पूरी script पर execute click करना जब सिर्फ selected statement चलना चाहिए, जो tab में हर statement चला देता है।
🔒

Chapter Quiz — Complete all 8 topics to unlock

0/8 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.