What is phpMyAdmin?
phpMyAdmin is a web-based tool for managing MySQL databases. It allows you to browse tables, run SQL queries, import/export data, and manage database users through an intuitive interface.
Accessing phpMyAdmin
- Log in to EGPNL
- Navigate to Databases → phpMyAdmin
- Select the database you want to manage
- phpMyAdmin opens in a new tab
Direct Access: You may also access phpMyAdmin directly via
https://yourdomain.com/phpmyadmin if enabled.
phpMyAdmin Interface
The main interface consists of:
- Left Panel: Database and table navigation
- Top Menu: SQL, Search, Query, Export, Import, Operations
- Main Area: Table data and query results
Common Tasks
Browse Table Data
- Click on a database in the left panel
- Click on a table name
- Click Browse to view rows
- Use pagination to navigate through records
Run SQL Queries
- Select your database
- Click the SQL tab
- Enter your SQL query
- Click Go to execute
-- Example: Select all users
SELECT * FROM users WHERE status = 'active';
-- Example: Update a record
UPDATE products SET price = 29.99 WHERE id = 5;
-- Example: Delete records
DELETE FROM logs WHERE created_at < '2024-01-01';
Caution: Always backup your database before running UPDATE or DELETE queries. There's no undo button!
Search Data
- Select a table
- Click the Search tab
- Enter search criteria for each column
- Click Go to find matching records
Edit Records
- Browse the table
- Click Edit next to any row
- Modify the values
- Click Go to save
Add New Records
- Select a table
- Click the Insert tab
- Fill in the values for each column
- Click Go to insert
Export Database
- Select the database
- Click Export tab
- Choose Quick or Custom export
- Format: SQL (recommended)
- Click Go to download
Custom Export: Use custom export for more options like compression (gzip), specific tables, or data-only exports.
Import Database
- Select the target database (or create a new one)
- Click Import tab
- Click Choose File and select your .sql file
- Click Go to import
Import Size Limits
phpMyAdmin has upload limits. For large files:
- Compress the .sql file to .sql.gz
- Use command line MySQL import instead
- Split large files into smaller chunks
Table Operations
Create a New Table
- Select the database
- Enter table name and number of columns
- Click Go
- Define each column (name, type, length, etc.)
- Click Save
Modify Table Structure
- Select the table
- Click Structure tab
- Use Add column or click Change on existing columns
Optimize Tables
- Select tables to optimize
- From dropdown, select Optimize table
- This reclaims unused space and improves performance
Useful SQL Queries
Find & Replace
UPDATE wp_posts
SET post_content = REPLACE(post_content, 'http://oldsite.com', 'https://newsite.com');
Reset WordPress Password
UPDATE wp_users
SET user_pass = MD5('newpassword')
WHERE user_login = 'admin';
Show Table Sizes
SELECT table_name,
ROUND((data_length + index_length) / 1024 / 1024, 2) AS 'Size (MB)'
FROM information_schema.tables
WHERE table_schema = 'your_database'
ORDER BY (data_length + index_length) DESC;
Was this article helpful?