config files for mysql
Bradley Giesbrecht
pixilla at macports.org
Tue Sep 16 10:07:39 PDT 2014
On Sep 15, 2014, at 2:20 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> On Sep 13, 2014, at 12:38 PM, Murray Eisenberg wrote:
>
>> What exactly is the relationship among the following files installed by mysql56-server?
>>
>> /private/etc/my_macports.conf
>> /opt/local/etc/mysql56/my-new.cnf
>> /opt/local/share/mysql56/support-files/macports/my.cnf
>>
>> And in which of these should one change settings? Or should one do it in a file my.cnf somewhere else?
>>
>> (This is very muddled given that the MacPorts port distributes files into somewhat different locations, relative to /opt/local, than the native MySQL distribution does, relative to /usr/local.)
>
> MySQL uses a configuration file called "my.cnf". Any file not named "my.cnf" is not used.
>
> There are many locations where MySQL looks for this file, and in a particular order. My recollection is that /etc/my.cnf (also known on OS X as /private/etc/my.cnf because /etc is a symlink to /private/etc) is the first location checked (so if my.cnf is found there then other locations are not checked) but I don't want to mislead you so I would refer you to the MySQL documentation which should list all the locations. The exception is the location that is specific to each MacPorts MySQL version, for example /opt/local/etc/mysql56/my.cnf for the mysql56 port. I don't remember with what precedence that location is checked.
Please refer to the mysql docs, look for "On Unix, Linux and Mac OS X, MySQL programs read startup options from the following files, in the specified order ":
http://dev.mysql.com/doc/refman/5.6/en/option-files.html
Regards,
Bradley Giesbrecht (pixilla)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20140916/9330e683/attachment.sig>
More information about the macports-users
mailing list