phpMyAdmin is a web-based tool for managing your MySQL databases. This guide covers the essential operations.
Accessing phpMyAdmin
Step 1. Log in to your cPanel account.
Step 2. In the Databases section, click on phpMyAdmin.
Step 3. Select the database you want to manage from the panel on the left.
Common Operations
Browsing and Editing Data
- Click on a table name to view its contents (rows and columns).
- Click Edit (pencil icon) on any row to modify data.
- Use the Search tab to find specific records.
Running SQL Queries
- Select your database, then click the SQL tab.
- Type your query in the text box and click Go.
- Example:
SELECT * FROM wp_users WHERE user_email = "[email protected]";
Importing a Database
- Select your database, then click the Import tab.
- Click Choose File and select your
.sqlbackup file. - Click Go to start the import.
Exporting a Database
- Select your database, then click the Export tab.
- Choose Quick for a full dump, or Custom to select specific tables.
- Click Go to download the export file.
Creating a New Table
- Select your database, enter a table name in the Create table section.
- Specify the number of columns and click Go.
- Define each column (Name, Type, Length/Values) and click Save.
Important Notes
- Always export a backup before making structural changes to your database.
- The
_prefix on tables (e.g.,wp_) is normal for WordPress and similar applications. - phpMyAdmin sessions expire after a period of inactivity. Refresh the page if operations fail.
Troubleshooting
- Import fails (timeout): Split large
.sqlfiles into smaller chunks, or use the Backup Wizard in cPanel. - "No database selected": Click on the database name in the left sidebar before performing operations.
- "Access denied": Ensure your cPanel database user has the correct privileges assigned.