Export database from phpMyAdmin
When to export a database?
Exporting a database is useful for:
- ✅ Creating regular backups
- ✅ Migrating a site to another server
- ✅ Sharing database structure
- ✅ Making a copy before important changes
Step 1: Access phpMyAdmin
- Log in to phpMyAdmin
- Log in with your credentials
Step 2: Select the database
- In the left panel, click on the database you want to export
If you want to export only specific tables, you can select them later.
Step 3: Open Export tab
- In the top menu, click on Export tab
Step 4: Select export method
phpMyAdmin offers two methods:
Quick Method:
- Quick export with default configuration
- Ideal for simple backups
- Standard SQL format
Custom Method:
- More configuration options
- Allows selecting specific tables
- Advanced format options
Step 5: Configure export options
Format:
- SQL: Standard SQL format (recommended)
- CSV: To open in Excel
- JSON: For modern applications
- XML: For data exchange
Tables:
- You can select all tables or just some
- Check the ones you want to export
SQL Options:
- ✅ Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT: Includes commands to delete tables before creating
- ✅ Add IF NOT EXISTS: Prevents errors if table already exists
- ✅ Add CREATE TABLE: Includes table structure
- ✅ Add AUTO_INCREMENT: Maintains auto increment values
- ✅ Enclose table and field names with backquotes: Better compatibility
Data:
- ✅ Add INSERT: Includes table data
- ✅ Add comments: Includes comments in the file
Compression:
- None: Uncompressed file
- zip: Compresses in ZIP format
- gzip: Compresses in GZIP format (more efficient)
Step 6: Start export
- Review all options
- Click Go or Continue
- The file will download automatically
Export only specific tables
If you only want to export some tables:
- Select the database
- In the table list, check only the ones you want to export
- Click Export with selected tables
- Configure options and export
Export only structure (without data)
Useful for copying database structure:
- In export options
- Uncheck Add INSERT in data section
- Check only structure options
- Export
The resulting file will only have CREATE TABLE commands without data.
Export only data (without structure)
Useful for copying only data:
- Uncheck Add CREATE TABLE
- Check Add INSERT
- Export
Common issues
File is too large and doesn't download
- Use compression (zip or gzip)
- Export only necessary tables
- Export from terminal for very large files
Export error
- Verify that you have sufficient permissions
- Verify that the database is not locked
- Try with quick method first
Exported file doesn't work when importing
- Verify that you checked "Add CREATE TABLE"
- Verify that the format is SQL
- Check if there are errors in the file
Export from terminal
For very large files, it's better to use terminal:
mysqldump -u user -p database_name > backup.sql
Or with compression:
mysqldump -u user -p database_name | gzip > backup.sql.gz
Tips
- ✅ Export regularly to keep backups updated
- ✅ Use compression for large files
- ✅ Save backups in a safe place (not just on the server)
- ✅ Verify that the exported file is valid before deleting data
- ✅ Consider automating exports with cron jobs
Need help?
If you're having trouble exporting a database or need help with configuration, open a ticket from the billing.baires.host panel or contact us for support.
You can also reach us through our social media:
- Instagram: @baires_host
- Discord (active support): https://discord.gg/dzjauatAFN
- Linktree: https://linktr.ee/baires.host