This can cause some problems with your MySQL databases, if you are noticing missing data this is the first place to check. If two of your MAMP installs update the same file at the same time, the 2nd to finish will not overwrite the existing file it will instead create a conflicted file, to fix this you just need to determine which file has the correct data and delete the other (removing the conflicted message in the file name). You will need to run the last 2 commands on any other computers you have MAMP installed. And that's it, restart your MAMP servers and you should be syncing your databases to Dropbox. Passing the -s option to the ln command will create a symbolic link, we then pass source file and the target file. ln -s ~/Dropbox/MAMP_DB/db /Applications/MAMP/db This will change the directory to your Dropbox folder, then copy the MAMP db folder to dropbox and remove it from the MAMP directory. Before starting make sure your MAMP servers are turned off, then open up terminal and enter. To sync your database you will need to move the MAMP db folder to dropbox and then create a symbolic link in the MAMP folder back to the db folder in the dropbox. I've been using this solution for about a year now and not run into any major problems so until I find a better way I'll continue to do so. This isn't the most ideal solution as you can run into some problems, especially if are running both versions of MAMP simultaneously. You can use Dropbox to sync your databases as well. All my projects are now sync'd on both machines but if I make any changes to the Database I've got to do this on both machines. I created a directory called sites in my Dropbox folder and then added my projects in here. I turned to Dropbox which is a service that synchronises a folder on your computer over the internet. As I work between a MacBook and an iMac I was looking for a away to keep my projects in sync between the 2 machines. This is great as it means you can test your files locally without having to upload them first. MAMP is brilliant as it installs the software (Apache, MySQL and PHP) used to run a web server similar to a LAMP server. I use MAMP as my local development environment.
0 Comments
Leave a Reply. |