Prerequisites
Complete the Installation guide before proceeding
XAMPP Apache and MySQL services must be running
Database Overview
The TiendaRopa database includes 8 interconnected tables for managing clothing inventory:prenda
Main inventory table with clothing items
categoria
Categories: Caballero, Dama, Infantil, Deportiva, Accesorios
talla
Size management (ch, m, g, ech, eg)
color
Color catalog for garments
empleado
Staff members (gerente, empleado)
proveedor
Supplier information
movimiento_stock
Stock movements (entrada, salida, ajuste)
actualizacion
Price change history
Step 1: Access phpMyAdmin
Step 2: Import the Database
TheTiendaRopa.sql file contains the complete database schema and sample data.
Import via phpMyAdmin
In phpMyAdmin:
- Click on the Import tab in the top menu
- Click Choose File and select
TiendaRopa.sql - Ensure format is set to SQL
- Scroll down and click Go/Import
You should see a success message: “Import has been successfully finished”
Step 3: Understand the Database Schema
Core Tables
- prenda (Garments)
- categoria (Categories)
- movimiento_stock (Stock Movements)
- actualizacion (Price Updates)
The main inventory table storing all clothing items.Key Relationships:
- Links to
categoria(clothing type) - Links to
talla(size) - Links to
color(color)
Step 4: Configure Database Connection
The database connection is managed throughdb.php using PDO.
Default Configuration
tienda_ropa/db.php
Custom Configuration
Only modify
db.php if you’ve customized your MySQL installation with:- A different root password
- A custom database user
- A non-standard port
- Remote database access
Step 5: Verify Database Tables
Check Table Structure
In phpMyAdmin, click on the
tienda_ropa database and verify all tables have data:| Table | Expected Rows |
|---|---|
| categoria | 5 |
| color | 5 |
| talla | 5 |
| empleado | 5 |
| proveedor | 5 |
| prenda | 15+ |
| movimiento_stock | 20+ |
| actualizacion | 6+ |
| registro | 5+ |
Browse Sample Data
Click on any table name, then click Browse to view the sample data.For example, clicking on
prenda should show items like:- Camisa Oxford Slim
- Pantalón Jean Clásico
- Vestido de Gala Rojo
- Playera Deportiva Pro
Step 6: Test the Application
Verify Homepage Loads
You should see:
- The TiendaRopa navigation bar
- An “Inventario” (Inventory) table
- Sample garments with prices, stock, categories, sizes, and colors
- Search functionality
- Sortable columns
If you see the inventory table with data, your database setup is complete!
Understanding Sample Data
The database includes realistic sample data to help you get started:Categories (categoria)
- Caballero: Men’s formal, informal, casual and formal wear
- Dama: Dresses, blouses and seasonal trends for women
- Infantil: Comfortable and durable clothing for children 2-12 years
- Deportiva: High-performance technical sportswear
- Accesorios: Accessories like belts, scarves and basic jewelry
Sizes (talla)
- ch: Chico (Small)
- m: Mediano (Medium)
- g: Grande (Large)
- ech: Extra Chico (Extra Small)
- eg: Extra Grande (Extra Large)
Colors (color)
- Negro Nocturno (Night Black)
- Blanco Pureza (Pure White)
- Azul Marino (Navy Blue)
- Rojo Pasión (Passion Red)
- Gris Oxford (Oxford Grey)
Employees (empleado)
Sample staff with roles:- Gerente (Manager): Karina Sánchez, Kennia De luna, Mariana Juárez
- Empleado (Employee): Miguel Esparza, Guadalupe Hernández
Sample Garments
Camisa Oxford Slim
Price: $450.00
Stock: 25
Category: Caballero
Size: M | Color: Azul Marino
Stock: 25
Category: Caballero
Size: M | Color: Azul Marino
Vestido de Gala Rojo
Price: $1,350.00
Stock: 10
Category: Dama
Size: M | Color: Rojo Pasión
Stock: 10
Category: Dama
Size: M | Color: Rojo Pasión
Playera Deportiva Pro
Price: $350.00
Stock: 50
Category: Deportiva
Size: CH | Color: Blanco Pureza
Stock: 50
Category: Deportiva
Size: CH | Color: Blanco Pureza
Sudadera Infantil Hoodie
Price: $400.00
Stock: 15
Category: Infantil
Size: M | Color: Gris Oxford
Stock: 15
Category: Infantil
Size: M | Color: Gris Oxford
Troubleshooting
Error: Access denied for user 'root'@'localhost'
Error: Access denied for user 'root'@'localhost'
Your MySQL root password doesn’t match the one in
db.php.Solution: Update the password in db.php or reset your MySQL root password:Error: Unknown database 'tienda_ropa'
Error: Unknown database 'tienda_ropa'
The database wasn’t created during import.Solution: Manually create it in phpMyAdmin SQL tab:Then re-import
TiendaRopa.sql.Tables are empty after import
Tables are empty after import
The INSERT statements may have failed.Solution: Check phpMyAdmin’s import log for errors. Ensure:
- The SQL file is complete and not corrupted
- You have sufficient MySQL privileges
- No foreign key constraint errors occurred
Connection error when accessing the application
Connection error when accessing the application
Check these common issues:
- MySQL not running: Start it in XAMPP Control Panel
- Wrong credentials: Verify
db.phpmatches your MySQL setup - PDO not enabled: Check PHP extensions in
php.ini
Foreign key constraint errors
Foreign key constraint errors
This happens if you try to insert/update data that violates relationships.Solution: The SQL file creates tables in the correct order. Always:
- Drop all tables if re-importing
- Import the complete SQL file
- Don’t manually modify table structure without updating constraints
Database Maintenance Tips
Next Steps
Core Features
Learn how to manage your clothing inventory
User Guide
Learn how to use the system effectively
Database Schema
Explore the complete database structure
Database Tables
View detailed table documentation
Your TiendaRopa installation is now complete and ready to use!