[ERROR] unknown variable 'defaults-file=my.cnf' (SOLVED)

I have a bitnami Redmine stack fully working, along with the plist (OS X server) to start it up automatically on bootup.

I recently installed a bitnami ResourceSpace stack, which is working great. Last thing to do was to setup a plist for it’s apache & mysql to auto-start on bootup. This is where I am running into problems…

ResourceSpace apache boots up fine with the plist. ResourceSpace MySQL does not. I get the following error: [ERROR] /resourcespace-8.0-0/mysql/bin/mysqld.bin: unknown variable 'defaults-file=/Applications/resourcespace-8.0-0/mysql/my.cnf' ERROR Aborting

I set everything up exactly like I did with redmine (plist wise), except I obviously changed certain lines to path to the correct ResourceSpace bitnami files. I also ensure that my.cnf has the same exact permissions as Redmines does (644).

Any ideas? Thank you.

EDIT: SOLUTION
My ctl.sh file contained “–mysqld=mysqld.bin”, but my PLIST file did not. Added –mysqld=mysqld.bin to my PLIST and the issue is fixed.

Hello @ITHelp15

What changes did you introduce in the MySQL configuration file my.cnf. It seems like a missconfiguration in that file.

I think the problem is in the position. I read in some MySQL forums that the option defaults-file must be at the beginning of the options list:
https://bugs.mysql.com/bug.php?id=31312

Best Regards,

Juan Ariza

/Applications/resourcespace-8.0-0/mysql/my.cnf

[mysqladmin]
user=root

[mysqld]
basedir=/Applications/resourcespace-8.0-0/mysql
datadir=/Applications/resourcespace-8.0-0/mysql/data
port=3307
socket=/Applications/resourcespace-8.0-0/mysql/tmp/mysql.sock
tmpdir=/Applications/resourcespace-8.0-0/mysql/tmp
max_allowed_packet=32M
bind-address=127.0.0.1

character-set-server=UTF8
collation-server=utf8_general_ci

[client]
port=3307
socket=/Applications/resourcespace-8.0-0/mysql/tmp/mysql.sock

default-character-set=UTF8
[manager]
port=3307
socket=/Applications/resourcespace-8.0-0/mysql/tmp/mysql.sock
pid-file=/Applications/resourcespace-8.0-0/mysql/tmp/manager.pid
default-mysqld-path=/Applications/resourcespace-8.0-0/mysql/bin/mysqld.bin

/Library/LaunchDaemons/com.bitnami-resourcespace.mysql.service.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>ctlscript-mysql-rs</string>
        <key>ProgramArguments</key>
        <array>
                <string>/Applications/resourcespace-8.0-0/mysql/bin/mysqld_safe</string>
                <string>--defaults-file=/Applications/resourcespace-8.0-0/mysql/my.cnf</string>
                <string>--port=3307</string>
                <string>--socket=/Applications/resourcespace-8.0-0/mysql/tmp/mysql.sock</string>
                <string>--datadir=/Applications/resourcespace-8.0-0/mysql/data</string>
                <string>--log-error=/Applications/resourcespace-8.0-0/mysql/data/mysqld.log</string>
                <string>--pid-file=/Applications/resourcespace-8.0-0/mysql/data/${machine_hostname}.pid</string>
       </array>
        <key>RunAtLoad</key>
        <true/>
        <key>UserName</key>
        <string>myadmin</string>
        <key>GroupName</key>
        <string>admin</string>
</dict>
</plist>

Here are my my.cnf and plist files. I don’t see what I am missing/doing wrong. Thanks for the help.

Hello @ITHelp15

Both your plist and your my.cnf file seems to be fine. Could you please take a look to the init script you will find at:

/Applications/resourcespace-8.0-0/mysql/scripts/ctl.sh

At the beginning of the file you will find a line with a content similar to this one:

MYSQL_START="/Applications/resourcespace-8.0-0/mysql/bin/mysqld_safe --defaults-file=/Applications/resourcespace-8.0-0/mysql/my.cnf --mysqld=mysqld.bin --socket=/Applications/resourcespace-8.0-0/mysql/tmp/mysql.sock  --datadir=/Applications/resourcespace-8.0-0/mysql/data --log-error=/Applications/resourcespace-8.0-0/mysql/data/mysqld.log  --pid-file=$MYSQL_PIDFILE --lower-

You can use it to compare with your plist file in order to see if there’s something different.

Best Regards,

Juan Ariza

Finally solved the issue.

My ctl.sh file (on the line you mentioned) contained “–mysqld=mysqld.bin”, and my PLIST file did not. Added –mysqld=mysqld.bin right after the defaults-file string/entry (just like it is within ctl.sh), and it fixed the issue.

Thanks for your help!

1 Like

We are glad that you were able to fix the issue. If you have any other questions, please do not hesitate to let us know.

Best regards,
Carlos R. Hernández