I'm having issues importing a sql.zip file into phpmyadmin. When I try to import the file I get the following error:
Fatal error:
Allowed memory size of 134217728 bytes exhausted (tried to allocate 132382880 bytes) in /usr/share/phpmyadmin/export.php on line 310
I've gone into the config file and the memory_limit is set to -1
(would it be better to set the limit?) and when I navigate into the export.php
file I can't find a reason for the error. As far as I know the export.php
file is still default, no one has edited the file.
Here's an image of the line (cursor marking line 310)
I've been beating my head against this for ages, any help would be appreciated.
-
It is either something in the sql.zip file that is causing the problem or the zip file is exceeding the file size limit.user2417483– user24174832018年11月28日 04:58:50 +00:00Commented Nov 28, 2018 at 4:58
-
Why import the DB via PHP? Just do it via the mysql interface, it is very straight forwarduser3783243– user37832432018年11月28日 05:11:30 +00:00Commented Nov 28, 2018 at 5:11
-
What about upload_max_filesize, post_max_size, max_execution_time and max_input_time?trpx– trpx2018年11月28日 08:01:56 +00:00Commented Nov 28, 2018 at 8:01
1 Answer 1
Check this answer https://stackoverflow.com/a/4546797/5458355. With a terminal, having mysql in your global path, try:
mysql -u <username> -p <databasename> < <filename.sql>
Is faster to import the db from terminal and you must do it if the file is too big... check also your Apache limits for file upload and memory limit.