which .cnf file is correct?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
publicGenome
Forum Contributor
Posts: 110
Joined: Thu Apr 16, 2015 7:55 am

which .cnf file is correct?

Post by publicGenome »

Hi Members,
I'm working on mac 0sx10.9, installed mysql with homebrew.

I do not have .cnf file at /etc
Upon digging some random thing, navigating to web pages, and checking out history of my commands, I found I've 2 .cnf files:

/usr/local/opt/mysql/my.cnf
and
/usr/local/Cellar/mysql/5.6.23/my.cnf


/usr/local/opt/mysql/my.cnf has datadir and socket mentioned.
same as /usr/local/Cellar/mysql/5.6.23/my.cnf

they both aren't linked. I did ls -shl and found nothing on them.

Now which one should I be keeping? Should I keep them both, or delete both, and create/copy them at /etc/my.cnf?

Thanks for your guidance.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: which .cnf file is correct?

Post by Celauran »

publicGenome wrote:Hi Members,
I'm working on mac 0sx10.9, installed mysql with homebrew.

I do not have .cnf file at /etc
Upon digging some random thing, navigating to web pages, and checking out history of my commands, I found I've 2 .cnf files:

/usr/local/opt/mysql/my.cnf
and
/usr/local/Cellar/mysql/5.6.23/my.cnf


/usr/local/opt/mysql/my.cnf has datadir and socket mentioned.
same as /usr/local/Cellar/mysql/5.6.23/my.cnf

they both aren't linked.
You sure?

[text][12:28 pm] [~]
$ ls -l /usr/local/opt | grep mysql
lrwxr-xr-x 1 username admin 22 26 May 14:48 mysql -> ../Cellar/mysql/5.6.24[/text]
publicGenome
Forum Contributor
Posts: 110
Joined: Thu Apr 16, 2015 7:55 am

Re: which .cnf file is correct?

Post by publicGenome »

Celauran wrote: You sure?

[text][12:28 pm] [~]
$ ls -l /usr/local/opt | grep mysql
lrwxr-xr-x 1 username admin 22 26 May 14:48 mysql -> ../Cellar/mysql/5.6.24[/text]
It's strange. :|
[text]
ls -shl /usr/local/Cellar/mysql/5.6.23/my.cnf
8 -rw-r--r-- 1 myusername admin 1.0K May 28 17:08 /usr/local/Cellar/mysql/5.6.23/my.cnf
[/text]

[text]
ls -shl /usr/local/opt/mysql/my.cnf
8 -rw-r--r-- 1 myusername admin 1.0K May 28 17:08 /usr/local/opt/mysql/my.cnf
[/text]
publicGenome
Forum Contributor
Posts: 110
Joined: Thu Apr 16, 2015 7:55 am

Re: which .cnf file is correct?

Post by publicGenome »

Alright. I made changes to sudo emacs /usr/local/Cellar/mysql/5.6.23/my.cnf
And they are visible to

less /usr/local/opt/mysql/my.cnf

I wonder why this isn't reflected in ls -shl :crazy:

Edit:

ls -shl /usr/local/opt/mysql
8 lrwxr-xr-x 1 username admin 22B Apr 8 13:52 /usr/local/opt/mysql -> ../Cellar/mysql/5.6.23

:drunk: :drunk:
publicGenome
Forum Contributor
Posts: 110
Joined: Thu Apr 16, 2015 7:55 am

Re: which .cnf file is correct?

Post by publicGenome »

Hi Celauran,

Back to my question, should I make a new my.cnf at /etc?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: which .cnf file is correct?

Post by Celauran »

No need. I've got almost exactly the same set up and it's working just fine. What issue(s) are you encountering that makes you think you'd need to?
publicGenome
Forum Contributor
Posts: 110
Joined: Thu Apr 16, 2015 7:55 am

Re: which .cnf file is correct?

Post by publicGenome »

Hi Celauran,
Thanks for confirming.
I'm little concerned about the logs of mysql. I do not have any file where logs are being spit into for failures, queries run, and similar things.

Hence, I'm rambling.
Post Reply