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

MySQL Installation और Setup

MySQL install करना एक नया storage room set up करने जैसा है: आप वह version चुनते हैं जो आपके computer से match करता है और इसे business के लिए खोलने के steps follow करते हैं।

Installation के लिए Prepare करना

Install करने से पहले, confirm करें कि आप अपने operating system और CPU architecture के लिए सही MySQL build download कर रहे हैं, क्योंकि आपके OS के साथ एक incompatible installer mix करना setup failures का सबसे common source है। पहले से कुछ सौ megabytes disk space भी free कर लें।

उदाहरण: Preparing for Installation

sql
-- Confirm the installer matches your OS and CPU architecture before running it

सही Edition चुनना

MySQL Community Edition free, fully-featured version है जिसे ज़्यादातर developers और छोटी teams इस्तेमाल करती हैं, जबकि Enterprise Edition compliance requirements वाले बड़े organizations के लिए advanced auditing, backup tooling, और official support contracts जैसे paid extras add करता है।

उदाहरण: Choosing the Right Edition

sql
-- MySQL Community Edition (free) vs Enterprise Edition (paid, extra tooling)

Installation Verify करना

install करने के बाद, एक client (command line, Workbench, या एक code library) से connect करें और यह confirm करने के लिए SELECT 1 जैसी एक trivial query चलाएँ कि server actually respond करता है — एक clean install फिर भी start होने में fail हो सकता है अगर एक port conflict या permissions issue हो।

उदाहरण: Verifying the Installation

sql
SELECT 1;

Initial Server Configuration

installer आपको default storage engine चुनने देता है (आज लगभग हमेशा InnoDB, इसके transaction और foreign-key support के लिए) और server की timezone setting, जो affect करती है कि TIMESTAMP columns बाद में कैसे interpret और display होते हैं।

उदाहरण: Initial Server Configuration

sql
CREATE TABLE test (id INT) ENGINE=InnoDB;
SET time_zone = '+00:00';

Installation को Secure करना

Setup के दौरान security hardening मुख्य रूप से एक strong root password set करने और, ideally, default enabled आने वाली default test databases और anonymous-user accounts हटाने के लिए mysql_secure_installation script चलाने के बारे में है।

उदाहरण: Securing the Installation

sql
-- Run mysql_secure_installation after setup to remove test databases and anonymous users
ALTER USER 'root'@'localhost' IDENTIFIED BY 'StrongPassword!23';
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. अपने operating system या CPU के लिए गलत build download करना, ताकि installer न चले या server start न हो।
  2. setup के दौरान चुने गए root password को भूल जाना, और फिर login न कर पाना।
  3. किसी ऐसे terminal में mysql type करना जो इसे ढूँढ नहीं पाता क्योंकि install folder PATH में नहीं है।
🔒

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.