You can export a MySQL or MariaDB database using the phpMyAdmin web interface. This process creates a .sql file containing the database structure and data, which can be used for backups or moving the database to a different location.
Before you begin
You will need:
Access to your hosting control panel (such as cPanel or Windows Control Panel).
The login credentials for your phpMyAdmin account.
A web browser.
Exporting the database
Log in to your hosting control panel.
Open the phpMyAdmin application.
In the left-hand sidebar of phpMyAdmin, click the name of the database you wish to export.
Click the Export tab located in the top navigation menu.
Select Custom as the Export method.
Under the Export method section, ensure the Format is set to SQL.
Scroll down to the Object creation options and ensure Add CREATE TABLE statement and Add AUTO_INCREMENT value are checked (these are typically enabled by default).
Click the Go button at the bottom of the page.
The browser will prompt you to save the .sql file. Choose a location on your computer and click Save.
Confirm the result
A
.sqlfile is downloaded to your computer.You can verify the file's contents by opening it in a text editor (such as Notepad++ or TextEdit) to ensure it contains the SQL commands for your tables.
If the export fails or the file is empty
If the export does not start or the resulting file is empty, it may be due to a script timeout or a memory limit.
Note: If you are attempting to export a very large database (typically over 100MB), phpMyAdmin may struggle to complete the process in a single request. In these cases, consider using a command-line tool or a dedicated database management tool like MySQL Workbench.
Limitations
This procedure is intended for standard database exports. If your database is exceptionally large, the web-based phpMyAdmin interface may time out before the export completes. This article does not cover exporting specific tables; it exports the entire selected database.
