Skip to main content

phpMyAdmin: managing your database from the browser

Hosting & cPanel · 19.04.2026 · 5 min read
Illustration for “phpMyAdmin: managing your database from the browser”

phpMyAdmin is a web application for managing MySQL/MariaDB databases. It's available in every cPanel account and lets you work with a database without knowing SQL commands.

Opening phpMyAdmin

cPanel → Databases → phpMyAdmin. The interface will open with your databases listed in the left panel.

Basic operations

Creating a database

It's better to create it via cPanel → MySQL Databases (this also creates the user and assigns privileges). You can also do it in phpMyAdmin: left panel → "New" → enter a name → "Create".

Importing a database

1. Select the database in the left panel
2. Open the "Import" tab
3. Click "Browse" and pick the .sql file
4. Click "Go"

Maximum file size: usually 50–512 MB
For bigger files use SSH:
mysql -u user -p dbname < backup.sql

Exporting a database

1. Select the database → "Export" tab
2. Method: Quick or Custom
3. Format: SQL
4. Click "Go"
✅ For regular backups, it's better to use cPanel → Backup or SSH mysqldump — phpMyAdmin isn't suited for files >100 MB.

Running an SQL query

-- Select the DB → "SQL" tab
-- Examples:
SELECT * FROM wp_users LIMIT 10;

UPDATE wp_options SET option_value='https://example.com'
WHERE option_name='siteurl';

ALTER TABLE wp_posts ADD INDEX (post_status, post_type);

Useful operations for WordPress

TaskSQL
Reset the admin passwordUPDATE wp_users SET user_pass=MD5('newpass') WHERE user_login='admin'
Change the site URLUPDATE wp_options SET option_value='https://new.com' WHERE option_name IN ('siteurl','home')
Delete spam commentsDELETE FROM wp_comments WHERE comment_approved='spam'
⚠️ Export the database before making any changes! A mistaken UPDATE without a WHERE clause can damage the entire database.

Common phpMyAdmin Errors

#1045 Cannot log in to the MySQL server

#2006 MySQL server has gone away

File exceeds the maximum size (upload_max_filesize)

#1698 Access denied for user 'root'@'localhost'
MessageCauseFix
#1045 Cannot log in to the MySQL serverWrong database username/password in the access configurationCheck the credentials in cPanel → MySQL Databases, reset the user's password if needed
#2006 MySQL server has gone awayImporting a large dump exceeded max_allowed_packet or the query execution timeImport via SSH instead: mysql -u user -p dbname < backup.sql instead of the web interface
File exceeds the maximum size (upload_max_filesize)The dump is larger than the upload limit set in php.ini for phpMyAdminCompress the file into a .zip before uploading, or import via SSH without the web form's limits
#1698 Access denied for user 'root'@'localhost'On Ubuntu/Debian, MySQL root authenticates via auth_socket by default, not by passwordLog in to phpMyAdmin as a separate database user with a password created in cPanel, not as root

phpMyAdmin vs. SSH and mysqldump: When to Use Which

TaskphpMyAdminSSH + mysqldump/mysql
A one-off simple query or row editFast, visual, no SSH neededOverkill for a small edit
Importing/exporting a database over 100 MBOften hits PHP limits and timeoutsWorks without web server restrictions
Regular automated backupsNot built for schedulingEasy to set up in cron
Bulk editing table structureConvenient visual editorRequires manual ALTER TABLE statements

When phpMyAdmin Doesn't Fit

  • The database is gigabytes in size — the web interface runs into PHP limits (upload_max_filesize, max_execution_time) and browser timeouts
  • You need regular automated operations — scheduled backups, deploy-time migrations — that's a job for SSH and backups, not a manual interface
  • You're working with a database that cPanel can't reach (an external MySQL server not integrated with the panel) — a direct client like DBeaver or an SSH tunnel is simpler then
  • You need transactional operations with a deliberate rollback on error — running SQL through a web form is less predictable than a script with an explicit BEGIN/COMMIT

Verifying the Result

# Compare the row count in a table before and after the operation
mysql -u user -p dbname -e "SELECT COUNT(*) FROM wp_posts;"

# Check that the dump actually imported without being cut off
tail -5 backup.sql
mysql -u user -p dbname -e "SHOW TABLES;" | wc -l
  1. After an import, compare the table count and the row count in key tables against what you expected — an import cut off by a limit often fails silently, without a clear error
  2. Open the site that uses this database and make sure it doesn't show a connection error or empty data
  3. After editing via the SQL tab, run the same SELECT again to confirm the change actually applied, rather than being stuck in a page cache
  4. For an export, open the .sql file in a text editor and check that it ends cleanly rather than breaking off in the middle of an INSERT

Resetting the MySQL password directly from the console when phpMyAdmin access is lost is covered in resetting the MySQL root password. Working with site files alongside the database is covered in the cPanel file manager.

Was this article helpful?
← Back to Knowledge Base Ask Support