Page MenuHomeFreeBSD

Fix ${mysql_optfile} in mysql56-server
AbandonedPublic

Authored by feld on Jan 20 2017, 3:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 10, 5:48 AM
Unknown Object (File)
Oct 2 2025, 5:40 PM
Unknown Object (File)
Oct 2 2025, 2:26 PM
Unknown Object (File)
Sep 15 2025, 7:05 PM
Unknown Object (File)
Aug 3 2025, 12:38 PM
Unknown Object (File)
Jul 27 2025, 12:41 AM
Unknown Object (File)
Jul 21 2025, 7:50 PM
Unknown Object (File)
Jul 18 2025, 3:53 PM
Subscribers
None

Details

Reviewers
mmokhi
mat
Summary

MySQL 5.6 used to obey mysql_optfile in rc.conf. Now it doesn't.

Looks like MySQL 5.7 doesn't obey this either, but few people run it.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 6900
Build 7090: arc lint + arc unit

Event Timeline

feld retitled this revision from to Fix ${mysql_optfile} in mysql56-server.
feld updated this object.
feld edited the test plan for this revision. (Show Details)
feld added a reviewer: mat.
databases/mysql56-server/files/mysql-server.in
40

I think this needs to be -z "${mysql_optfile}" so that if it is empty, it still works

42

And then, if you only get here if it is empty, the ${foo=} construct is redundant.

actually this is wrong as well. We've determined the issue is that a lot of people are running MySQL databases without any my.cnf at all, which sets certain InnoDB settings. If you try to use any my.cnf without those same settings MySQL will fail to start.

databases/mysql56-server/files/mysql-server.in
44

While we're here, What if we check existing of this file (${mysql_confdir}/my.cnf) too? just like the upper condition.
Then, if this was not existing too, leave mysql_optfile to be empty.
I guess this would be more helpful to ensure daemon never encounter to fatal error of nonexisting files.