This is a great way for developers who tend to work on several different machines to sync their local development environments. Notice! This is not a recommended configuration for mysql, and can result in some problems involving locks on files etc.. if you really want to sync a db for production purposes or more robustly use mysql replication. That being said, I’ve been running this configuration for a while and haven’t run into any serious problems. Just make sure you only have one instance of MAMP running at a time!

Here’s how it’s done using your terminal: (only 2 steps!)

  1. Move your MAMP mysql folder into your Dropbox

    mv /Applications/MAMP/db/mysql ~/Dropbox/
    
  2. Create a symbolic link (a shortcut) from the old location to the new one (create it in the /Applications/MAMP/db/mysql folder)

    ln -s ~/Dropbox/mysql mysql
    

To confirm that you did things correctly:

run ls -l and you should see this: mysql -> /Users/kevinsloan2/Dropbox/mysql

If you’re not using Dropbox yet – you’re missing out! It’s such a wonderful tool that makes working across several machines seamless, sign up here!