Create MySQL configuration file (my.cnf) on MAMP

Printer-friendly version

If you ever find yourself in need to adjust some MySQL settings and you're running a MAMP server on Mac OS X, you can always create a my.cnf file using the following command:

sudo cp /Applications/MAMP/Library/share/mysql/my-medium.cnf /etc/my.cnf

You now have created your own my.cnf file where you can adjust some settings. Please make sure restart your MySQL instance after altering the configuration.

You have a few other starting point for creating a my.cnf file. MAMP ships with 5 configuration files for some typical settings. The filenames should be self explanatory:

./Library/share/mysql/my-huge.cnf
./Library/share/mysql/my-innodb-heavy-4G.cnf
./Library/share/mysql/my-large.cnf
./Library/share/mysql/my-medium.cnf
./Library/share/mysql/my-small.cnf

 Source : http://www.drupalcoder.com/story/308-create-mysql-configuration-file-myc...