MySQL Forums
Forum List  »  Install & Repo

Re: my,cnf file does not exist on Mac OSX 10.6
Posted by: Jean-Yves Rouffiac
Date: July 13, 2010 07:28AM

Hi Jim,

By default, the OS X installation does not use a my.cnf, and MySQL just uses the default values.

To set up your own my.cnf, you could just create a file straight in /etc, or do the following (excuse me if I say anything which is obvious to you, but this may help complete OS X beginners who are not familiar with the Unix command line):

Log in to OS X using an administrator-level account (to keep things simple lower down)

Open Terminal (in Utilities folder under Applications folder)

cd /usr/local/mysql/support-files/
sudo cp my-huge.cnf /etc/my.cnf

and enter your admin password when prompted. You could do this from a non-admin account by using the su command, but that's probably a bit scary for some people ;)

You will now have a copy of my.cnf in /etc (just in case you don't know, that means the etc folder directly under the root folder, not under MySQL's install folder)

You can edit it with a text-editor such as TextWrangler by using File->Open Hidden, or if you are happy to use the command line, use:

cd /etc
sudo nano my.cnf

To exit without saving, press CTRL+X, to Save then exit it's: CTRL+O then CTRL+X

(O meaning write Out, X meaning eXit)

Hope this helps.

PS: but as I said at the start, MySQL under OS X does not actually need a my.cnf file if you are happy with the defaults (which should be fine for most non-intensive uses)

------------------
Jean-Yves Rouffiac
www.shimeril.com



Edited 4 time(s). Last edit at 07/13/2010 07:33AM by Jean-Yves Rouffiac.

Options: ReplyQuote


Subject
Written By
Posted
Re: my,cnf file does not exist on Mac OSX 10.6
July 13, 2010 07:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.