How do I change the MySQL data folder path in a Mac?
- I am running OS X 10.10 & MySQL 5.6
- In Windows I can edit
datadirinmy.ini - For Mac, mysqld does not have parameter for
--defaults-file=
How do I change the MySQL data folder path in a Mac?
datadir in my.ini --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 .