Menu
Courses / sql-basic / Installing SQL

Installing SQL

05 / 14 Part of sql-basic






SQL Topic 5 - Installing MySQL and Tools





SQL Basics Course


Topic 5: Installing MySQL & Database Tools


Learn how to install MySQL and the tools used by developers to manage databases.







Learning Objectives



  • Understand MySQL

  • Install MySQL Server

  • Install XAMPP

  • Use phpMyAdmin

  • Use MySQL Workbench

  • Create your first database





What is MySQL?


MySQL is one of the world's most popular Relational Database Management Systems (RDBMS).




Application → MySQL Server → Database


It stores, manages and retrieves data using SQL.





Why Learn MySQL?



  • Easy to learn

  • Widely used in web development

  • Works with PHP, Laravel, Python, Java and more

  • Open source

  • Excellent community support





MySQL Installation Steps (Windows)



  1. Download MySQL Community Installer.

  2. Run the installer.

  3. Select Developer Default setup.

  4. Install required components.

  5. Set root password.

  6. Complete installation.





Important Components
























ComponentPurpose
MySQL ServerStores databases
MySQL WorkbenchGUI management tool
MySQL ShellCommand-line access
ConnectorsConnect applications to MySQL





What is XAMPP?


XAMPP is a package that contains Apache, MySQL/MariaDB, PHP and other tools.




XAMPP = Apache + MySQL + PHP + Perl


It is commonly used for local web development.





Installing XAMPP



  1. Download XAMPP.

  2. Run installer.

  3. Select MySQL and Apache.

  4. Complete installation.

  5. Start Apache and MySQL from Control Panel.





What is phpMyAdmin?


phpMyAdmin is a browser-based tool for managing MySQL databases.




http://localhost/phpmyadmin


It allows database creation, table management and SQL execution without command line tools.





What is MySQL Workbench?


MySQL Workbench is the official graphical client for MySQL.




  • Create databases

  • Run SQL queries

  • Design schemas

  • Manage users

  • Visualize relationships





Connecting to MySQL
























SettingValue
Hostlocalhost
Port3306
Usernameroot
PasswordYour Password





Creating Your First Database




CREATE DATABASE school_db;


This command creates a database named school_db.





Common Installation Problems



  • Port 3306 already in use

  • Forgot root password

  • MySQL service not starting

  • Firewall blocking connections

  • Incorrect installation path





Best Practices



  • Use strong passwords

  • Keep backups

  • Update MySQL regularly

  • Install only required components

  • Practice using Workbench and phpMyAdmin





Practice Exercises



  1. Install MySQL Server.

  2. Install XAMPP.

  3. Open phpMyAdmin.

  4. Create a database named college_db.

  5. Connect using MySQL Workbench.





Quiz


1. What is MySQL?


2. What port does MySQL use by default?


3. What is phpMyAdmin used for?


4. What is XAMPP?


5. Which tool provides a graphical interface for MySQL?





Summary



  • MySQL is a relational database system.

  • XAMPP simplifies local development setup.

  • phpMyAdmin provides browser-based database management.

  • MySQL Workbench is the official GUI tool.

  • You can create databases using SQL commands.