I want to upload 4MB zipped mysql database file in the XAMPP phpmyadmin.
Everytime its giving me error
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 31798080 bytes) in E:\xampp\phpMyAdmin\libraries\unzip.lib.php on line 325
Xampp Memory Limit is 32M
If its 32M = 32mb , then it should be able to upload 4MB zipped file.
phpMyAdmin has to unzip it right? As you need it to restore the database backup? It can’t just accept a zip file and magically restore the database without unzipping it.
Maybe we should start this conversation over again. What exactly are you trying to achieve here?
As long as it’s your machine and not a live host that might not be happy about you doing it, you could try upping the limit eg. I have a large CSV file I’m in the process of importing into a database
ini_set('memory_limit', '512M'); // 4x default
//ini_set('memory_limit', -1); // no limit
@Mittineague probably has the best solution, simply alter your PHP.ini to set the memory limit to no limit (if you don’t want to modify the phpMyAdmin source code) and restart Apache so the changes take effect.
Another alternative is to ditch using phpMyAdmin and install MySQL Workbench which is an application (not dependent on PHP) and can do importing of databases as well (thus no memory limit).
Not to take you away from the previous solutions, but for any large mysql imports I ever need to perform, I use Big Dump. It’s a script that handles the import of large files a little bit at a time, allowing you to handle huge files that would otherwise be problematic to import by other means.