Do you have to keep the database's binary data files synchronised?
I assume this is for development, for which I would recommend using a "proper" version control system (Like http://www.selenic.com/mercurial/wiki/">git, darcs and so on), but this should apply to using Dropbox or any other file sync tool..
Just synchronise the code as usual, but export your database schema and some testing data into a regular file (probably as a .sql
dump from MAMP's included phpMyAdmin tool), and keep that synchronised. Since it's a regular file, you shouldn't have any problems.
You could write a small script that wipes the database and populates it with the schema file, and one that does the opposite (dumps the database to a file).. Before you start working, you run the importdatabase
script. Once you're done, you run the dumpdatabase
script.
Basically, export your database to a .sql file, synchronise that.
The other options are just to sync the entire MAMP folder (although it is pretty big), or to move the db
folder to DropBox's folder, and symlink the /Applications/MAMP/db/
to here (using the command ln -s /Applications/MAMP/db/ /Volumes/DropBoxFolder/db/
- creating an alias in Finder doesn't seem to work the same, annoyingly..)