How do I change the MySQL data folder path in a Mac? How do I change the MySQL data folder path in a Mac?


I am running OS X 10.10 &amp; MySQL 5.6
In Windows I can edit datadir in my.ini 
For Mac, mysqld does not have parameter for --defaults-file=
First shutdown mysql

mysqladmin -uroot -p shutdown


Then, launch mysqld by hand

mysqld --defaults-file=...


or if MySQL is running with all defaults and you are just changing datadir, do this

mysqld --datadir=/path/to/mysql/data


Here is a StackOverflow question (MySQL 'my.cnf' location?) with multiple suggestions on where my.cnf might be for Mac OS when installed .