0

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.

Sanu0786
56910 silver badges16 bronze badges
asked Nov 28, 2018 at 4:49
3
  • It is either something in the sql.zip file that is causing the problem or the zip file is exceeding the file size limit. Commented Nov 28, 2018 at 4:58
  • Why import the DB via PHP? Just do it via the mysql interface, it is very straight forward Commented Nov 28, 2018 at 5:11
  • What about upload_max_filesize, post_max_size, max_execution_time and max_input_time? Commented Nov 28, 2018 at 8:01

1 Answer 1

0

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.

answered Nov 28, 2018 at 5:26

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.