> ## Documentation Index
> Fetch the complete documentation index at: https://help.noxity.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Export a Database

> Download a SQL dump of your database from phpMyAdmin, with options for format, compression, and partial exports.

Exporting downloads a snapshot of your database to your laptop. Use it before risky changes, when migrating to another host, or when handing the data to a developer for local testing.

For long-term backups, use [JetBackup](/web-hosting/cpanel/file-management/jetbackup) instead. It runs nightly, stores off-server, and includes the whole account, not just one database.

## Quick export (the fast path)

<Steps>
  <Step title="Pick the database from the left tree">
    Click the database name. Don't click into a single table unless you only want that table.
  </Step>

  <Step title="Open the Export tab">
    Top of the page.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/database-management/phpmyadmin/export/quick-light.png" alt="phpMyAdmin Export tab with Quick option selected" className="block dark:hidden" />

      <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/database-management/phpmyadmin/export/quick-dark.png" alt="phpMyAdmin Export tab with Quick option selected" className="hidden dark:block" />
    </Frame>
  </Step>

  <Step title="Leave defaults, click Go">
    **Export method**: Quick. **Format**: SQL. The browser downloads `database_name.sql` straight away.
  </Step>
</Steps>

That's the 90% case. For everything else, switch to **Custom**.

## Custom export

Custom mode reveals every option. Useful when:

* You only want some tables, not all
* You want compressed output (`.zip` or `.gz`)
* You want the dump in CSV, JSON, or another format
* You need `INSERT IGNORE` instead of `INSERT`, or no `DROP TABLE` statements

<Frame caption="Custom export with table selector and format options">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/database-management/phpmyadmin/export/custom-light.png" alt="phpMyAdmin Custom Export with all options visible" className="block dark:hidden" />

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/database-management/phpmyadmin/export/custom-dark.png" alt="phpMyAdmin Custom Export with all options visible" className="hidden dark:block" />
</Frame>

The options most people change:

| Option                              | What to set                                                                |
| ----------------------------------- | -------------------------------------------------------------------------- |
| **Tables**                          | Pick a subset, or click **Unselect All** then re-pick                      |
| **Output: Compression**             | `gzipped` for big databases, usually 1/10th the size                       |
| **Format**                          | `SQL` is the standard. `CSV` for spreadsheets. `JSON` for programmatic use |
| **Object creation: Add DROP TABLE** | Tick if you want the dump to recreate from scratch on import               |
| **Data dump: Use extended INSERTs** | Untick if you've ever hit "MySQL server has gone away" on import           |

## Format choices

| Format | When to use                                                        |
| ------ | ------------------------------------------------------------------ |
| SQL    | Re-importing into another MySQL/MariaDB server                     |
| CSV    | Opening in Excel or Google Sheets, or feeding into a data pipeline |
| JSON   | Loading into a script that doesn't speak SQL                       |
| XML    | Legacy enterprise tools that demand it                             |
| PDF    | Printing a snapshot for compliance (schema only, no data)          |

For backups, always SQL.

## Export a single table

<Steps>
  <Step title="Drill into the table">
    Click the database in the left tree, then click the table name.
  </Step>

  <Step title="Open the Export tab">
    Same tab as for whole-database export. The scope is now just this one table.
  </Step>

  <Step title="Pick the format and click Go">
    The download is a single-table dump.
  </Step>
</Steps>

## Common issues

<AccordionGroup>
  <Accordion title="The download is empty or 0 bytes">
    Browser blocked the download, or the export hit a timeout. Switch to **Custom**, tick **Save output to a file**, and pick `gzipped` compression. Smaller files finish before any timeout.

    For very large exports, use SSH and `mysqldump`:

    ```bash theme={}
    ssh username@hostname.web.systeminterface.net
    mysqldump -u username_dbuser -p username_dbname | gzip > backup.sql.gz
    ```
  </Accordion>

  <Accordion title="The dump has DEFINER clauses I don't want">
    Custom export → scroll to **Object creation options** → untick **Add CREATE PROCEDURE / FUNCTION / EVENT statement** if you're moving the dump to a host that doesn't run procedures. Or use the SSH route with `mysqldump --skip-definer`.
  </Accordion>

  <Accordion title="I want to re-import on a different host">
    Tick **Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER statement** in the Custom export. This makes the dump self-replacing. Re-importing replaces existing tables instead of failing on duplicates.

    Watch for `utf8mb4_0900_ai_ci` if exporting from MySQL 8 to a MariaDB target. See the import [common issues](/web-hosting/cpanel/database-management/phpmyadmin/import) for the workaround.
  </Accordion>
</AccordionGroup>

## Next

<CardGroup cols={2}>
  <Card title="Re-import the dump elsewhere" icon="file-import" href="/web-hosting/cpanel/database-management/phpmyadmin/import">
    Same Import tab on another phpMyAdmin or another host.
  </Card>

  <Card title="Set up nightly off-server backups" icon="dragon" href="/web-hosting/cpanel/file-management/jetbackup">
    JetBackup runs without you needing to remember.
  </Card>
</CardGroup>

## Need a hand?

<CardGroup cols={2}>
  <Card title="Open a ticket" icon="life-ring" href="https://members.noxity.io/submitticket.php">
    Best for anything that needs an account check or a config change on our end.
  </Card>

  <Card title="Live chat" icon="messages" href="https://noxity.io/contact">
    Faster for quick questions during business hours.
  </Card>
</CardGroup>
