[Bug 209512] mysql57-server-5.7.12: Server not usable after installation

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue May 17 12:33:10 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209512

--- Comment #22 from Miroslav Lachman <000.fbsd at quip.cz> ---
(In reply to Markus Kohlmeyer from comment #18)
I think /etc/my.cnf and /etc/mysql/my.cnf should be removed. It was discussed
in Bug 182547 (according to hier(7))
/etc/my.cnf and /etc/mysql/my.cnf should be replaced by their /usr/local/
counterparts. /usr/local/etc/my.cnf and /usr/local/etc/mysql/my.cnf should not
be added to the end of the list. IMHO.

We have this on all our MariaDB instances:

my_print_defaults --help | grep -A1 'Default options'
Default options are read from the following files in the given order:
/usr/local/etc/my.cnf /usr/local/etc/mysql/my.cnf ~/.my.cnf

And /var/db/mysql/my.cnf is specified as extra-file

--defaults-extra-file=/var/db/mysql/my.cnf


(In reply to Mahdi Mokhtari from comment #19)
There is one dangerous problem with changing my.cnf locations and search path.
If you have working MySQL server with configuration in /usr/local/etc/my.cnf
and you configure some non-default things for InnoDB like different file names,
number of files for innodb_data_file_path or innodb_log_files_in_group, or size
of innodb_log_file_size then if something with my.cnf is silently changed and
your MySQL server will restart after upgrade without this my.cnf file or if it
find some my.cnf file in location previously not scanned, your MySQL server
will not start (if you are lucky) or start and try to create missing files. It
will end up in non working or half broken MySQL server and you will have hard
time to find what is going on.

This is why changing my.cnf search path is dangerous.

So the change is not related to hier(7) only. 
Hier just says:
    /etc/   system configuration files and scripts

Anything from ports / pkg should go to /usr/local prefix, and /usr/local/etc/
should mimics /etc/

Searching for my.cnf in /etc/ and /etc/mysql/ is the same as searching
httpd.conf in /etc/ and /etc/apache24/. 
It is wrong on FreeBSD. 
But it is OK on operating systems where base system and 3rd party packages are
not separated to /usr/local/.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list