Export of large Mysql database through phpMyAdmin fails with "Out of memory"

Refers to:

  • Plesk 11.0 for Windows
  • Plesk 11.5 for Windows
  • MG:e2dc3601a3c414429d4ab22916c8184b

Created:

2016-11-16 13:09:38 UTC

Modified:

2017-02-13 06:11:16 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Export of large Mysql database through phpMyAdmin fails with "Out of memory"

Symptoms

Export of large Mysql database (for example, 200 MB or higher) does not work, when memory usage exceeds memory_limit value in Plesk php config file (%plesk_dir%\admin\php.ini). You may get the following error:

  1. 500 Internal server error in browser.

  2. In php error log:

    PHP Fatal error:  Out of memory (allocated 278134784) (tried to allocate 268173312 bytes) in C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\htdocs\\domains\\databases\\phpMyAdmin\\export.php on line 202

Cause

Limitation of database size in PHPMyadmin. More information can be found here:

http://sourceforge.net/p/phpmyadmin/feature-requests/847/

http://sourceforge.net/p/phpmyadmin/feature-requests/1295/

Resolution

1) Use native mysql command line utlity to create backup of database:

    C:\\Program Files (x86)\\Parallels\\Plesk\\Databases\\MySQL51\\bin\\mysqldump -uadmin -p"*****" -P3306 database> dump_of_database.txt

Where database is name of database, dump_of_database.txt is file where you would like to export database. * * is the password for Mysql admin user.

2) Change php limits and|or use gzip archiving on the fly. For that correct config.default.php, usually it is located in C:\Program Files (x86)\Parallels\Plesk\admin\htdocs\domains\databases\phpMyAdmin\libraries\config.default.php. Change string:

    >>$cfg['Export']['compression'] = 'none';

to

    >>$cfg['Export']['compression'] = 'gzip';
Have more questions? Submit a request
Please sign in to leave a comment.