26. Installation of MySQL, troubleshooting basic database issues, creation and use of database.


V E S R N TECHNOLOGIES



Installation of MySQL, troubleshooting basic database issues, creation and use of database.

Aim
To install MySQL, solve basic database issues and create & use a database using SQL commands.
Requirements
Computer system
MySQL Server / XAMPP / WAMP
Part – 1 : Install MySQL
Procedure (Using XAMPP – Easy Method)
Download XAMPP
Run setup → Install
Open XAMPP Control Panel
Start Apache and MySQL
Click Admin (phpMyAdmin opens in browser)
Result: MySQL server installed successfully.
Part – 2 : Create Database
Using SQL Command
Open phpMyAdmin → SQL tab → type:
CREATE DATABASE iti_db;
Check Database
SHOW DATABASES;
Part – 3 : Create Table
USE iti_db;
CREATE TABLE students (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50),
trade VARCHAR(30),
marks INT
);
Part – 4 : Insert Data
INSERT INTO students(name, trade, marks) VALUES
('Raju','Electrician',78),
('Kumar','Fitter',82),
('Ravi','Welder',69);
Part – 5 : View Data
SELECT * FROM students;
Part – 6 : Update and Delete Data
Update
UPDATE students SET marks=85 WHERE name='Raju';
Delete
DELETE FROM students WHERE id=3;
Part – 7 : Troubleshooting Basic Issues
Problem Solution
MySQL not starting Check port 3306 busy / Stop Skype
Access denied Check username & password
Table not found Select correct database using USE
Connection error Start MySQL service in XAMPP
phpMyAdmin not opening Start Apache server
Result
MySQL installed successfully. Database and table created and data inserted, updated and deleted using SQL queries.
Precautions
Always select correct database before queries
Take backup before delete command
Avoid duplicate primary key
I practiced all under my trainer Venugopal Sir.

Popular posts from this blog

Install Windows 7 Operating System - Practical

COPA Bits for Computer Based Test (CBT) by Venugopal Vanjarapu

COPA