On 09/14/16 13:44, Wietse Venema wrote:
> Viktor Dukhovni:
>> On Wed, Sep 14, 2016 at 06:07:22PM +0200, Antoine Nguyen wrote:
>>
>>> Looks like I've found the issue. Actually, the mysql connector does not read
>>> the default /etc/my.cnf file (or at least the package I installed for CentOS
>>> 7).
>>
>> Perhaps Postfix needs to try to explicitly load the default config
>> location when no override is set.
> 
> How do we do that, without hard-coding '/etc/my.cnf' into Postfix?
> That pathname is almost certainly incorrect on systems like *BSD
> that install ports configuration files outside the base system
> directory tree.

It will even be incorrect on many Linux distributions (Ubuntu for
example), many of which default to /etc/mysql/ instead of /etc/.

> I wonder if there is a different way to make clients read /etc/my.cnf.
> I also wonder why they don't read that file by default.

"It depends."  As a rule, MySQL clients *do* read $sysconfigdir/my.cnf
and ${HOME}/.my.cnf by default, if they exist.  But when you have MySQL
packages and MySQL clients built with conflicting ideas of where
$sysconfigdir should be, things start to fall apart.  This problem is
going to exist anywhere except an Apple-like walled garden.

There exists a Linux Filesystem Standard that lays out in general terms
what should be expected to be where.  There are many distributions that
follow it.  There are also many that don't.  And then you get into *BSD,
and Solaris, and...


-- 
  Phil Stracchino
  Babylon Communications
  ph...@caerllewys.net
  p...@co.ordinate.org
  Landline: 603.293.8485

Reply via email to