phpMyAdmin in DirectAdmin
Summary
This guide explains how to access and use phpMyAdmin from DirectAdmin. phpMyAdmin is a browser‑based tool for managing MySQL/MariaDB databases, allowing you to create, edit, import, export, and optimize databases without needing command‑line access.
Overview
phpMyAdmin allows you to:
- View and edit database tables
- Run SQL queries
- Import and export databases
- Create and delete tables
- Manage users and privileges (if permitted)
- Optimize, repair, and analyze tables
It is the primary database management tool for most hosting environments.
Requirements
- DirectAdmin user-level access
- At least one database created
- Correct database username and password
Step-by-Step Instructions
1. Access phpMyAdmin
You can open phpMyAdmin in two ways:
A) Through DirectAdmin
- Log in to DirectAdmin
- Go to Extra Features → phpMyAdmin
- You will be logged in automatically (single sign‑on)
B) Direct URL
Most servers also support:
https://yourdomain.com/phpmyadmin
You must log in manually using your database username and password.
2. Log In (If Not Auto‑Logged)
Use your database credentials:
Database user: dbuser_name
Password: yourdbpassword
These are created under **MySQL Databases** in DirectAdmin.
3. Select a Database
On the left sidebar, click the database you want to manage.
You will see:
- Tables
- Rows
- Indexes
- Collation
- Size
4. Browse and Edit Tables
- Click a table name
- Click “Browse” to view rows
- Click “Edit” to modify a row
- Click “Delete” to remove a row
Useful for:
- Fixing CMS settings
- Updating admin passwords
- Editing configuration values
5. Run SQL Queries
- Click the “SQL” tab
- Enter your SQL command
- Click “Go”
Examples:
UPDATE users SET password='newpass' WHERE id=1;
SELECT * FROM wp_options;
6. Import a Database
- Click the database name
- Go to “Import”
- Choose a .sql or .zip file
- Click “Go”
Used for:
- Restoring backups
- Migrating websites
- Importing CMS data
7. Export a Database
- Click the database
- Go to “Export”
- Choose Quick or Custom
- Click “Go”
Useful for:
- Backups
- Migrations
- Developer copies
8. Create or Delete Tables
- Click “Structure”
- Use “Create table” to add new tables
- Select tables → “Drop” to delete
Be careful — deleting tables is permanent.
9. Optimize or Repair Tables
If your site is slow or showing errors:
- Select tables
- Choose “Optimize table”
- Choose “Repair table”
This can fix:
- Corrupted tables
- Slow queries
- CMS errors
Troubleshooting
Cannot Log In
- Wrong database username/password
- Database user not assigned to the database
- Hostname must be “localhost”
Import Fails
- File too large
- SQL syntax errors
- Incompatible MySQL version
Export File Empty
- No tables selected
- Database is empty
- Corrupted tables
Changes Not Showing on Website
- CMS caching
- CDN caching
- Wrong database edited
Access Denied Errors
- User lacks privileges
- Database belongs to another account
Security Notes
- Never share your database password
- Do not run SQL queries you don’t understand
- Always back up before making major changes
- Avoid editing WordPress/Magento tables manually unless necessary
Related Articles
- [MySQL Databases](ca://s?q=MySQL_Databases)
- [Backup & Restore](ca://s?q=Backup_and_Restore)
- [Site Summary & Logs](ca://s?q=Site_Summary_and_Logs)
- [Terminal](ca://s?q=Terminal)
- [WordPress Manager](ca://s?q=WordPress_Manager_by_Softaculous)