Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac OS X mySQL custom database path (MAMP PRO)

I'm using MAMP (OS-X 10.6.6) and I want to move my mySQL db folder to my dropbox folder. The MySQL server MAMP runs stores its databases in

/Library/Application Support/appsolute/MAMP PRO/db/mysql

..and I can't get it to follow symlinks or aliases to the mysql folder.

Is there a way to change the path mySQL uses for storing its databases? On the MAMP forum they say it's not possible, but I imagine there must be some kind of config file for whatever mySQL server it is that MAMP is running that can be changed to specify an alternative location for the used DBs..?

Anyone know how to acheive this? Storing the DB's on dropbox is the last element I need to solve to be able to work on my projects from my different computers.

like image 665
mikkelbreum Avatar asked Jan 20 '11 10:01

mikkelbreum


People also ask

Where is MySQL config file in MAMP?

The configuration file “my. cnf” of MySQL can be found here: “/Applications/MAMP/tmp/mysql/my. cnf”.

Where does MAMP Pro store databases?

Your MySQL 5.7 database data is located in “/Library/Application Support/appsolute/MAMP PRO/db/mysql57”.


1 Answers

Just realized that its just the finder 'alias' type that won't work. creating a proper unix symlink works fine. so doing this solves the problem and keeps the databases on dropbox.

ln -s /Users/username/Dropbox/MAMP_db/mysql /Library/Application\ Support/appsolute/MAMP\ PRO/db/mysql
like image 198
mikkelbreum Avatar answered Sep 25 '22 22:09

mikkelbreum