
phpMyAdmin is the standard web-based interface for managing MySQL databases. It allows you to view, create, edit, and delete databases and their contents without ever needing to write a command in a terminal. Whether you are setting up WordPress, importing a database backup, running a custom SQL query, or fixing a corrupted table, phpMyAdmin is the tool you will reach for. DirectAdmin includes phpMyAdmin access on all hosting plans at AsiaGB.
What Is phpMyAdmin?
phpMyAdmin is a free, open-source administration tool for MySQL and MariaDB databases. It provides a graphical interface that lets non-technical users manage database content through a browser, while also offering a powerful SQL query editor for developers who prefer working directly with SQL commands. It is installed server-wide and accessible from within your DirectAdmin control panel.
Accessing phpMyAdmin via DirectAdmin
To open phpMyAdmin, log in to DirectAdmin and navigate to the Extra Features section. Click the phpMyAdmin link. You will be automatically logged in to phpMyAdmin with your hosting account's MySQL credentials — no separate username or password is required. phpMyAdmin will open in a new browser tab showing all databases assigned to your account.
Interface and Main Menus
The phpMyAdmin interface is divided into two sections:
- Left sidebar — Lists all your databases. Click on a database name to expand it and see its tables.
- Main content area — Shows operations for the currently selected database or table, including Browse, Structure, Search, Insert, Export, Import, and Operations tabs.
Viewing Database Structure and Tables
Click on a database name in the left sidebar to open it. The main area will show all tables in that database with their row counts and sizes. Click on any table name to open it. From there, the Browse tab shows all rows, Structure shows the column definitions, and SQL lets you run custom queries on that table.
Importing SQL Files
Importing an SQL file is the most common way to restore a database backup or transfer a database from another server. To import:
- Click on the target database name in the left sidebar.
- Click the Import tab in the main content area.
- Click Choose File and select your
.sqlfile from your computer. - Leave the format set to SQL and click Go at the bottom of the page.
- phpMyAdmin will execute the SQL statements and import all tables and data.
Important: Always create a backup (export) of your existing database before importing a new SQL file. Importing can overwrite or modify existing tables, and this action cannot be undone. A pre-import backup ensures you can restore the previous state if something goes wrong.
Exporting and Backing Up Databases
To export a database as a backup:
- Select the database you want to export from the left sidebar.
- Click the Export tab.
- Choose Quick export method and ensure the format is set to SQL.
- Click Go. Your browser will download a
.sqlfile containing all table structures and data.
For a more customized export (choosing specific tables, compressing the file), use the Custom export method instead of Quick.
Running SQL Queries
For tasks not available through the graphical interface, you can run SQL commands directly. Select your database from the sidebar, then click the SQL tab. Type your SQL statement in the query box and click Go. Results will be displayed in a table below the query box. This is useful for bulk updates, searches across multiple fields, or running database repair commands.
Adding, Editing, and Deleting Records
To add a new row to a table, open the table and click the Insert tab. Fill in the values for each column and click Go. To edit an existing row, click the Edit (pencil) icon next to the row in Browse mode. To delete a row, click the Delete (trash) icon. You can also select multiple rows and delete them in bulk.
Creating New Databases
While phpMyAdmin can display and manage existing databases, new databases should be created through DirectAdmin's MySQL Databases section rather than directly in phpMyAdmin. This is because DirectAdmin also needs to create the associated database user and password for your application to connect. Once created in DirectAdmin, the new database will immediately appear in phpMyAdmin.
Managing Table Structure and Modifying Columns
The Structure tab within any table shows a complete list of columns with their data types, lengths, default values, indexes, and extra attributes. From this view you can:
- Click the Edit (pencil) icon next to any column to modify its data type, length, default value, or NULL setting.
- Click the Drop icon to remove a column permanently — this action cannot be undone, so always back up first.
- Use the Add columns form at the bottom of the page to insert new columns at the end of the table or after a specific column.
- Click the Indexes link to add, remove, or modify indexes including PRIMARY KEY, UNIQUE, and INDEX.
All of these actions generate the corresponding ALTER TABLE SQL statement and execute it for you, so you never have to remember the exact syntax for modifying column definitions.
Searching Data Across Tables
phpMyAdmin provides two levels of search functionality. At the table level, the Search tab lets you build a WHERE clause visually — select a column, choose an operator (LIKE, =, >, <, IS NULL, etc.), enter the value, and click Go. phpMyAdmin constructs and runs the SELECT query automatically. This is the fastest way to find a specific record without writing SQL manually.
At the database level, the Search tab lets you search for a text string across all tables simultaneously. This is very useful when you do not know which table contains the data you are looking for — for example, tracking down all references to an old domain name across every table in a WordPress database before performing a migration.
Optimizing and Repairing Tables
Over time, especially after many DELETE operations, MySQL tables can develop fragmented storage that wastes disk space and slows queries. The Operations tab for each table provides three maintenance tools:
- Optimize table — Defragments the table storage and updates index statistics. Equivalent to running
OPTIMIZE TABLE tablename. Recommended after bulk deletes. - Repair table — Fixes a corrupted MyISAM table. If a table shows as crashed in Browse view, use this first before considering more drastic options.
- Empty table (TRUNCATE) — Deletes all rows but keeps the table structure. Faster than DELETE and resets AUTO_INCREMENT counters. Use when you need a clean slate for a table without dropping and recreating it.
For InnoDB tables (the default engine for WordPress and most modern applications), OPTIMIZE TABLE actually runs a full table rebuild rather than a simple defragment, which is more time-consuming but also more thorough. For large production tables, schedule this during low-traffic periods.
phpMyAdmin Tips and Best Practices
These practical tips will help you get the most out of phpMyAdmin while avoiding common mistakes:
Always Export Before Importing
Before you import a new .sql file into an existing database, export the current state of that database first. Even if the import fails halfway through, you will have a clean backup to restore from. This takes only a few seconds with the Quick export method and can save hours of recovery work.
Use the SQL Tab for Bulk Updates
The graphical Edit interface is convenient for single rows, but for updating multiple rows at once, write an UPDATE statement in the SQL tab. For example, to reset all user passwords or update site URLs after a WordPress migration, a single UPDATE WHERE statement is far more efficient than editing rows one by one.
Check Table Engine and Collation
In the Operations tab, you can see and change the storage engine and collation of a table. Most modern applications work best with InnoDB engine and utf8mb4_unicode_ci collation, which supports the full Unicode character set including emoji. If you see tables using MyISAM or utf8_general_ci in an older database, consider migrating them for better compatibility.
Use Row Limits When Browsing Large Tables
phpMyAdmin limits Browse results to 25 rows by default to prevent timeouts on large tables. You can increase this limit in the Browse view, but be careful with very large tables — loading tens of thousands of rows in a browser can be slow. For large tables, use the Search or SQL tab with a WHERE clause to narrow down the results you actually need.
Hosting with Unlimited MySQL Databases
AsiaGB hosting plans include phpMyAdmin access and support multiple MySQL databases — ideal for running WordPress, WooCommerce, and custom applications.
View Hosting Plans