Database Management Using
XAMPP & MySQL
Hassan Zeb
K4FUASCS012
Web Development Course
University of Central Punjab
Instructor: Prof. Shakir Hussain
What is a Database?
• A structured way to store, organize, and
retrieve data.
• Used in websites, apps, business systems.
• Examples: Instagram, Daraz, UCP student
portal.
Why XAMPP + MySQL?
• XAMPP = Apache + MySQL + PHP
• MySQL = Structured relational DBMS
• Used for web app development and testing
locally.
XAMPP Control Panel &
phpMyAdmin
• Steps:
• 1. Start Apache & MySQL in XAMPP
• 2. Open localhost/phpmyadmin
• 3. Create/manage databases easily
Creating a Database and Table
• Create DB: student_db
• Table: students (id, name, email, course)
• id: INT PK AUTO_INCREMENT
• Others: VARCHAR(100)
CRUD Operations - Overview
• C: INSERT
• R: SELECT
• U: UPDATE
• D: DELETE
• These are the 4 basic operations in any
database.
Create - INSERT
• INSERT INTO students (name, email, course)
• VALUES ('Ali', 'ali@gmail.com', 'Web Dev');
Read - SELECT
• SELECT * FROM students;
• SELECT * FROM students WHERE course =
'ReactJS';
Update - UPDATE
• UPDATE students SET course = 'Full Stack'
WHERE id = 1;
Delete - DELETE
• DELETE FROM students WHERE id = 1;
Live Demo Instructions
• Show all CRUD operations in phpMyAdmin:
• - Insert a record
• - Select all records
• - Update a course
• - Delete a student
MySQL in Web Dev (Concept)
• Frontend (form) → PHP Script →
INSERT/SELECT → MySQL DB
• Test it locally using XAMPP before live
deployment.
Benefits of MySQL & XAMPP
• ✔ Free and Open-source
• ✔ Works with PHP easily
• ✔ Fast, reliable, secure
• ✔ Ideal for students & developers
Common Errors & Fixes
• - Apache/MySQL won't start → Change ports
• - DB not found → Check spelling
• - phpMyAdmin issues → Restart XAMPP, clear
browser cache
Real-World Use Cases
• - E-commerce apps (orders, users)
• - Social media (posts, comments)
• - University systems (attendance, grades)
Conclusion & Q/A
• ✅ CRUD operations = Core of DBs
• ✅ XAMPP + MySQL = Essential web tools
• ✅ Practice SQL for hands-on learning
• Questions?