MYSQL INSTALLATION GUIDE
Create a MySQL Database and Table
1. Login to MySQL:
Use the MySQL command-line tool:
mysql -u root -p
Enter your MySQL root password.
2. Create a Database:
CREATE DATABASE ci_example_db;
3. Use the Database:
USE ci_example_db;
4. Create a Table: Example table for user management:
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
5. Insert Sample Data:
INSERT INTO users (name, email, password) VALUES
('John Doe', 'john@example.com', MD5('password123')),
('Jane Doe', 'jane@example.com', MD5('password123'));
('John Doe', 'john@example.com', MD5('password123')),
('Jane Doe', 'jane@example.com', MD5('password123'));