Disabling MySQL skip-networking ??

Bradley Giesbrecht pixilla at macports.org
Wed Feb 24 17:37:12 PST 2016


> On Feb 24, 2016, at 5:31 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
> 
> 
> On Feb 24, 2016, at 5:10 PM, David Herron wrote:
> 
>> I want to have MySQL on my laptop with no skip-networking and with
>> 
>> bind-address=127.0.0.1
>> 
>> 
>> 
>> The problem is that the /opt/local/etc/mysql56/macports-default.cnf has skip-networking
>> 
>> The reasoning given is so we can run multiple simultaneous MySQL's side-by-side.
>> 
>> But.. what if I am okay with using just one MySQL and want/need to use a TCP/IP connection to access the database?
>> 
>> As it is, the MacPorts MySQL sets skip-networking in a file which will be overwritten whenever I upgrade (via selfupdate or whatever).  Which means even if I commented out skip-networking, it can reappear some later time and I might not remember about this setting. 
>> 
>> That's what just happened to me.  I remember now a few weeks ago having pulled my hair out over why I couldn't access MySQL, and then finding the skip-networking option and commenting it out.  Then today I again spent most of the day tearing my hair out, then finding that option had mysteriously uncommented itself.
>> 
>> Would it be enough to remove the "!include" line from my.cnf?  Would the macports-default.cnf then be ignored?
> 
> Yes, if you don't want the behavior of the macports default config, don't include it in your my.cnf. Your my.cnf file is yours to edit; MacPorts won't touch it.

David, I feel your pain, we tried to make it clear in the notes, perhaps the notes could be improved:
port notes mysql56


Regards,
Bradley Giesbrecht (pixilla)



More information about the macports-users mailing list