Adminer running out of memory upon sql import - Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 174873888 bytes) in /etc/scripts/local-adminer.php on line 92


#1

How can I resolve this issue? I have 8GB of system memory on my PC so I imagine this is a setting issue. I can’t import the SQL file until this is resolved. Please help.


#2

Hi Cody,

In this case I would recommend using MySQL CLI (command line) to get this job done.

Here’s what you can do:

  1. Move the SQL file into the site’s /app directory (untar it if it’s tar/gzipped)
  2. Right-click on the site in Local’s sidebar and go to “Open Site SSH”
  3. Enter mysql -u root -proot local < /app/SQLFILENAME.sql (replace SQLFILENAME.sql with the correct name) and then press enter

#3

You can also run wp db import /app/SQLFILENAME.sql and that will use whatever database credentials are in wp-config.php.


#4

Thanks Clay!


#5

I’ve tried both of these methods and it “appears” to process my .sql script, but once I refresh page (for site and/or adminer), nothing has changed. With the wp-cli command, it gives a success message. If it’s being successful - any ideas on where/what DB it is successfully updating (cuz it’s not the actual site’s)?

I also tried trimming off everything after “local” just to login to mysql and then run “show tables” - no luck there (not surprising, though, given other results). Thanks in advance!


#6

Okay, I figured out my issue! I didn’t notice that I included DB create lines in my SQL export, so my import was working fine - just to a new/different database than “local”. Once I updated my wp-config.php to point to the correct DB, the world became a happier place!


closed #7

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.