I’m trying to figure out what the /sql directory actually does? I was hoping when I start a site the database tables in the /sql directory get imported but this doesn’t seem to be the case. This would mean I could develop on my home machine, push everything to git and then on my work machine pull everything down, start the site and it would then use the same database as I had at home.
If this is not the case, how do I go about syncing the database between machines with Local by Flywheel?
I’d guess that the files actually used by Local / MySQL are “hidden” somewhere in ~/.docker/machine/machines/pressmatic/disk.vmdisk, and the exported sql files are really just protection/backup, and only used for exports to zip --> re-import into Local.
The “live” MySQL files could be located at [local vmdisk]/var/lib/mysql.
Maybe a solution might look a bit like a Local add-on that fires a WP-CLI script to import exposed MySQL data into the live database and vice-versa.
Update: just read this post and thought – what if had a switch in Local to use SQLite instead of MySQL, wouldn’t that make synching over file systems (DropBox, Google Drive, whatever) a lot easier?
I’m trying to use Wordmove to mirror sites. A guy in the forums said he did it, but I have no idea how to run mysqldump if I don’t even know the path to Flywheel’s mysql or if it even has mysqldump installed. I tried using a locally installed mysql but it couldn’t find the ‘localhost’ database. I’m guessing that’s because ‘local’ isn’t in my local install of mysql.