I want to unzip a DB file and import it via the CLI onto my existing Local database. I can’t figure out how to do it.
If I manually open Sequal Pro and Import the database it merges. But whenever I try to run: $ /Users/chris/WhateverPath/database.sql mysql -u root -p local
Hmm, so if I understand correctly: you created a new instance, deleted the default database generated by LbF and instead added your database than ran this command?
I’m a rookie when it comes to running MySQL commands in the terminal.
Yes, but that applied to my particular situation, I just referenced the command that did the importing to MySQL. Wish I could help you further, hopefully one of the devs will chime in.
myloader -p root -d /app/sql --overwrite-tables --database local
This command assumes that you moved the SQL files into your site’s app/sql folder which can be accessed by right-clicking on the site in Local’s sidebar, going to “Reveal in Finder…” and then navigating to app/sql in the Finder window.
Tried this solution but I’m getting the following error:
root@4ecf392a2749:/# myloader -p root -d /app/sql --overwrite-tables --database local
** (myloader:1949): CRITICAL **: the specified directory is not a mydumper backup
I had to create the sql folder in app as it didn’t exist initially…
Any ideas?