docker-magento
docker-magento copied to clipboard
Request for help importing large database
Description
Hi, Mark — first of all, thank you so much for this repo. It's the best one-step Magento install I've come across.
I am not reporting a bug but asking for an assist. I'm still fairly new to Docker, and I'm not quite connecting the dots when it comes to certain concepts. I know you must be busy, so huge thanks in advance.
Steps To Reproduce
I'm trying to import a large database from the command line.
I've done this many times before in other environments, but the concepts of Docker are confusing me, haha.
In short: Where on my the hard drive for my local system — ie the computer I'm physically working on — do I put the SQL.gz file, and where should I run the mysql import command? Should I open the shell for the magento mariadb container?
Thank you!
Expected Result
Actual Result
unzip your SQL.gz file in local (not in docker container)
# Import existing database:
bin/mysql < ../existing/magento.sql
unzip your SQL.gz file in local (not in docker container)
# Import existing database: bin/mysql < ../existing/magento.sql
Thanks so much for the response! Can you be more specific, though? I moved the file to my local, in my users directory, and ran this command from the bash line of the database container:
mysql -u root -pmagento < /Users/robertjpeterson/mysql_dump/db.sql.gz
Error: Cannot open ... No such file
I'm not sure what I'm missing.
Thanks again!
Hey, I think I found the solution — but now I'm running into another error. Thank you again for your help!!!
@robert-j-peterson You may unzip your gz file
gzip -d db.sql.gz
# or
gunzip db.sql.gz
Sorry just saw all these messages now! I keep trying to stay on top of my GitHub repos but it's hard. Glad you figured it out, but I'll be closing this one out as a non-issue. I'd recommend creating a Discussion instead of an Issue if you need help with something.