phpMyAdmin is a web page for looking inside your MySQL databases: you can see the tables your website uses, read and edit individual rows, run SQL queries and export a copy. This guide shows how to open phpMyAdmin from cPanel and find your way around it, with safe examples you can try on a WordPress database.
What phpMyAdmin is (and isn't)
Your website software -- WordPress, Joomla, an online shop -- keeps its content in a database. The database is made of tables (think of spreadsheets), each with columns and rows. phpMyAdmin simply shows you those tables in your browser and lets you change them.
That power cuts both ways. There's no "undo" button in phpMyAdmin. A deleted row or a mistyped query takes effect instantly on your live website. Get into the habit of exporting a copy before you change anything (see the import and export guide in the related links), and remember your account is also backed up automatically with JetBackup 5.
A few things are done in cPanel, not phpMyAdmin:
- Creating databases and database users -- use Databases > Manage My Databases or Database Wizard. cPanel needs to know about every database and user, and anything created inside phpMyAdmin won't be set up properly.
- Changing a database user's password -- use Manage My Databases.
- Deleting a whole database -- use Manage My Databases.
How to open phpMyAdmin from cPanel
- Log in to cPanel (from the client area: Services > My Services, choose your plan, then Log in to cPanel).
- In the Databases section, click phpMyAdmin. You can also type
phpmyadmininto the cPanel search bar. - phpMyAdmin opens in a new browser tab. You're logged in automatically -- there's no separate phpMyAdmin password to remember.
If your browser blocks the new tab, allow pop-ups for your cPanel address and click the link again.
A tour of the phpMyAdmin screen
The left-hand panel
The left side lists every MySQL database on your account. Each name starts with your cPanel username and an underscore, for example username_wp123. You'll also see information_schema, a read-only built-in database that describes the others -- you can ignore it.
Click the + next to a database to expand its list of tables, or click the database name itself to open it. The small house icon at the top of the panel takes you back to the start page.
The start page
The first page you see shows general information such as the database server version (our servers run MariaDB 10.11, which is fully MySQL-compatible) and phpMyAdmin appearance settings. You don't need to change anything here.
Tabs when a database is selected
Once you click a database name, the tabs across the top apply to that database:
| Tab | What it's for |
|---|---|
| Structure | Lists every table with its row count, size and storage engine. Tick tables here to empty, drop, check, repair or optimize them. |
| SQL | A box where you can type and run SQL queries against this database. |
| Search | Looks for a word or phrase across some or all tables. |
| Query | A helper for building queries without typing SQL. |
| Export / Import | Download a copy of the database, or load a .sql file into it. |
| Operations | Database-wide settings such as the default collation. Avoid the rename and copy options here -- use cPanel instead. |
| Routines, Events, Triggers | Stored procedures and automated jobs. Most small sites don't use them. |
Depending on the window width, some tabs are tucked under a More menu on the right.
Tabs when a table is selected
Click a table name in the left panel (or in the Structure list) and the tabs change:
- Browse -- shows the rows, 25 at a time by default. Use the arrows above the grid to page through.
- Structure -- shows the columns and their types.
- SQL -- run a query, with the table name filled in for you.
- Search -- find rows where a column matches a value.
- Insert -- add a new row by hand.
- Export, Import, Operations -- the same tools, for just this table.
Finding your website's database
If you have more than one database, check which one the site actually uses before you change anything. For WordPress:
- In cPanel, go to Files > File Manager and open
public_html(or the folder WordPress is in). - Right-click
wp-config.phpand choose View. - Note the
DB_NAMEvalue and the$table_prefixline near the bottom. The prefix is usuallywp_, but many sites use something random such aswpx7_.
In the examples below, replace wp_ with your own prefix.
Everyday tasks in phpMyAdmin
Look at rows in a table
- Click your database in the left panel, then click a table such as
wp_options. - The Browse tab opens and shows the first rows.
- To find something specific, use the Filter rows box above the grid, or the table's Search tab.
Edit a single value
A common example: checking or correcting your WordPress site address after a move.
- Export the database first (Export tab, Quick, SQL, Export).
- Open the
wp_optionstable. Thesiteurlandhomerows are normally on the first page. - Click Edit (the pencil) on the row you want to change.
- Change the text in the option_value box, for example to
https://example.com, with no slash at the end. - Click Go. phpMyAdmin shows the query it ran and "1 row affected".
You can also double-click a cell in the Browse grid to edit it in place, then press Enter to save. Changing siteurl and home only changes the main address; links inside your posts are separate -- see the search and replace guide in the related links.
Run a read-only query
The SQL tab lets you ask the database questions. SELECT queries only read data, so they're safe to experiment with. Try these on a WordPress database:
-- List administrator accounts
SELECT u.ID, u.user_login, u.user_email
FROM wp_users u
JOIN wp_usermeta m ON m.user_id = u.ID
WHERE m.meta_key = 'wp_capabilities'
AND m.meta_value LIKE '%administrator%';
-- Count published posts and pages
SELECT post_type, COUNT(*) FROM wp_posts
WHERE post_status = 'publish'
GROUP BY post_type;
-- Find the biggest autoloaded options (a common cause of slow sites)
SELECT option_name, LENGTH(option_value) AS bytes
FROM wp_options WHERE autoload IN ('yes','on')
ORDER BY bytes DESC LIMIT 20;
Paste a query into the box and click Go. Queries that start with UPDATE, DELETE, DROP or TRUNCATE change data -- phpMyAdmin asks you to confirm the dangerous ones, but it won't stop you.
Search the whole database
- Click the database name, then the Search tab.
- Type the word or phrase, choose how to match it (for example the exact phrase as substring), click Select all under the table list, and click Go.
- The results show how many matches each table has. Click Browse next to a table to see them.
This is handy for tracking down an old domain name, a spam link or a strange script that appeared in your content.
See how big your tables are
Click the database name and look at the Structure tab. The Size column shows each table's size and the total at the bottom. Very large wp_options, log or session tables often point to a plugin that stores too much data.
Troubleshooting
phpMyAdmin asks for a username and password
You've opened phpMyAdmin from a bookmark or an old tab and the session has expired. Close the tab and open phpMyAdmin again from cPanel. Don't try your cPanel or database password in that box -- open it from cPanel instead.
A new database doesn't appear in the left panel
phpMyAdmin loads its list when it opens. Click the reload icon at the top of the left panel, or close the tab and open phpMyAdmin again from cPanel.
"#1142 - ... command denied to user"
You tried something that shared hosting doesn't allow, such as creating a database or user with SQL, or changing server settings. Do those tasks in cPanel's Manage My Databases. If you're not sure why a normal query is being refused, open a ticket and include the full error.
"Failed to set session cookie" or "token mismatch"
Your browser is blocking cookies for phpMyAdmin, or the session is stale. Close all phpMyAdmin tabs, log out of cPanel, log in again and reopen phpMyAdmin. If it keeps happening, try a private window or another browser.
I changed something and broke my site
If you exported first, import that file into the database (see the import and export guide). If you didn't, restore the database from JetBackup 5 -- pick the most recent backup from before your change.
The page is slow or times out on a big table
Browsing a table with hundreds of thousands of rows can be slow. Use the Search tab or a query with a WHERE and LIMIT instead of paging through everything. For very large exports, SSH is faster -- see the related guides.
Common questions
Is there a separate phpMyAdmin password?
No. phpMyAdmin uses your cPanel login and opens automatically. Your database users' passwords are only for your website's config files.
Can I use phpMyAdmin on my phone?
It works in a mobile browser, but the tables are wide and easy to mis-tap. Use a computer for anything that changes data.
Can other people use phpMyAdmin on my account?
Only people who can log in to your cPanel. If a developer needs database access, a safer option is an SSH tunnel with a desktop app, or a separate database user for just the database they need.
Why don't I see a "User accounts" tab?
Database users are managed by cPanel on shared hosting, so that tab isn't available. Use Databases > Manage My Databases.
Related guides
- How to Import and Export a Database with phpMyAdmin
- How to Create a MySQL Database and User in cPanel
- How to Restore a MySQL Database with JetBackup 5
- How to Reset Your WordPress Admin Password
- How to Log In to cPanel from the Client Area
Still stuck? Open a support ticket and the Instant Access Internet Services team will help.
