phpMyAdmin Export Not Working — Server Administrator's Troubleshooting Guide
Identify the Error
Before applying a fix, identify why the export is failing.
For closely related phpMyAdmin topics, see phpMyAdmin "Error During Session Start", MySQL Configuration for phpMyAdmin Export, and phpMyAdmin Export Not Working.
Check phpMyAdmin Errors
- Open phpMyAdmin
- Try exporting a small table first.
- If a blank page appears or a timeout occurs, check the logs.
Inspect Browser Console (F12)
- Open Developer Tools (F12 or Ctrl + Shift + I in Chrome).
- Go to the Console tab.
- Look for errors related to timeouts, JavaScript failures, or CORS issues.
Check Web Server Logs
# or for Nginx:
tail -f /var/log/nginx/error.log
Look for errors like:
504 Gateway Timeout
MySQL server has gone away
Check phpMyAdmin Configuration Logs
Once you have identified the issue, proceed to the relevant fix below.
Fix PHP Limitations
If the export fails due to timeout, memory, or upload size limits, increase PHP settings.
Edit php.ini
Find the php.ini file:
Edit it:
Modify these values:
memory_limit = 512M
max_execution_time = 600
max_input_time = 600
post_max_size = 512M
upload_max_filesize = 512M
Explanation:
memory_limit> Prevents large exports from failing due to memory limits.max_execution_time> Extends PHP script execution time.max_input_time> Prevents premature termination.post_max_size&upload_max_filesize> Ensures large exports/imports work.
Restart Apache/Nginx:
# or for Nginx:
sudo systemctl restart nginx php8.0-fpm
Fix MySQL Configuration
Increase MySQL Timeout Values
Edit MySQL configuration:
Add or modify:
[mysqld]
max_allowed_packet=512M
net_read_timeout=600
net_write_timeout=600
wait_timeout=600
interactive_timeout=600
Restart MySQL:
Check for Corrupt Tables
If export fails only for certain tables, run:
To repair:
Fix Web Server (Apache/Nginx) Issues
Increase Apache/Nginx Timeout
For Apache
Edit:
Add or modify:
Timeout 600
ProxyTimeout 600
Restart Apache:
For Nginx
Edit:
Add or modify:
fastcgi_read_timeout 600;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
Restart Nginx:
Check File Permissions
If phpMyAdmin cannot write the export file, check file permissions:
sudo chmod -R 755 /var/lib/phpmyadmin/tmp/
This ensures phpMyAdmin can temporarily store exported files.
Use mysqldump as an Alternative
If phpMyAdmin still fails, use mysqldump:
For large databases:
Summary of Fixes
| Issue | Fix |
|---|---|
| Export fails due to timeout | Increase max_execution_time in php.ini |
| Large database export fails | Increase memory_limit, max_allowed_packet |
| MySQL crashes during export | Increase wait_timeout, repair corrupt tables |
| Nginx/Apache timeout | Increase timeout values |
| Permission errors | Set correct permissions on /var/lib/phpmyadmin/tmp/ |
| Still not working? | Use mysqldump |
By following these systematic troubleshooting steps, you can fix phpMyAdmin export issues and ensure smooth database backups.


