Skip to content

Add support for specifying a .cnf file #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions support-files/mysql.server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@
# If you want to affect other MySQL variables, you should make your changes
# in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.

# Use cnffile if your my.cnf file is somewhere unusual or named
# something other than my.cnf. If you don't use a my.cnf file:
# If you change base dir, you must also change datadir. These may get
# overwritten by settings in the MySQL configuration files.

cnffile=
basedir=
datadir=

Expand Down Expand Up @@ -231,9 +233,14 @@ fi
#

extra_args=""
if test -r "$basedir/my.cnf"
if test -z "$cnffile"
then
extra_args="-e $basedir/my.cnf"
if test -r "$basedir/my.cnf"
then
extra_args="-e $basedir/my.cnf"
fi
else
extra_args="-e $cnffile"
fi

parse_server_arguments `$print_defaults $extra_args mysqld server mysql_server mysql.server`
Expand Down