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

Created:

2016-11-16 13:09:38 UTC

Modified:

2017-04-24 11:12:14 UTC

0

Was this article helpful?


Have more questions?

Submit a request

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

Applicable to:

  • Plesk 11.0 for Windows
  • Plesk 11.5 for Windows

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:500 Internal server error in browser.

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.