Bug 240949 - databases/mysql57-server subtle start script issue
Summary: databases/mysql57-server subtle start script issue
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jochen Neumeister
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-30 19:47 UTC by PK1048
Modified: 2022-01-07 18:12 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (joneum)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description PK1048 2019-09-30 19:47:32 UTC
The pkg-message states:

MySQL57 has a default %%ETCDIR%%/my.cnf,
remember to replace it wit your own
or set `mysql_optfile="$YOUR_CNF_FILE` in rc.conf.

And the /usr/local/etc/rc.d/mysql-server script states:

# mysql_optfile (str):  Server-specific option file.
#                       Set it in the rc.conf or default behaviour of
#                       `mysqld_safe` itself, will be picking
#                       ${mysql_confdir}/my.cnf if it exists.

But setting mysql_optfile in /etc/rc.conf does not replace the default my.cnf file, instead it sets the mysqld_safe --defaults-extra-file parameter, which is invoked as well as the default from /usr/local/etc/mysql/my.cnf.

Either make the pkg-message and comment in the rc.d script clear that both are invoked or set the mysqld_safe --defaults-file parameter instead of --defaults-extra-file.

From the mysqld_safe man page:

       o   --defaults-extra-file=file_name

           Read this option file in addition to the usual option files. If the
           file does not exist or is otherwise inaccessible, the server will
           exit with an error.  file_name is interpreted relative to the
           current directory if given as a relative path name rather than a
           full path name. This must be the first option on the command line
           if it is used.

           For additional information about this and other option-file
           options, see Section 4.2.2.3, "Command-Line Options that Affect
           Option-File Handling".

       o   --defaults-file=file_name

           Use only the given option file. If the file does not exist or is
           otherwise inaccessible, the server will exit with an error.
           file_name is interpreted relative to the current directory if given
           as a relative path name rather than a full path name. This must be
           the first option on the command line if it is used.

           For additional information about this and other option-file
           options, see Section 4.2.2.3, "Command-Line Options that Affect
           Option-File Handling".
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-25 03:05:35 UTC
^Triage: Assign to new maintainer (ports r523992)
Comment 2 Jochen Neumeister freebsd_committer freebsd_triage 2021-12-21 05:33:19 UTC
does the problem still exist?