I am using XAMPP Mac and I have the need to change the default mysql database location. In XAMPP windows, it was a case of adding the line to the my.ini file:
datadir = "MY DRIVE"
In XAMPP for mac the config file is now my.cnf and I added the following:
datadir=/Volumes/KINGSTON/mysql/data
The XAMPP panel (manager-osx.app) allows me to start the mysql process and I can access databases correctly through phpmyadmin. However, after making the datadir change, the status indicator goes from amber to red and the Status turns to "Stopped". However the mysql process continues to run! If I rem out the datadir line and restart mysql it works perfectly so my issue is to do with the added line.
The excellent What's keeping me Application tells me that the mysql process continues to run after the XAMPP panel shows it as stopped and I therefore cannot eject the drive. It would seem that I am confusing the XAMPP control panel and it cannot detect the mysql status correctly since changing the datadir. Are there any other lines to add to my.cnf file? How would you do this?