I want to start mysql with the command argument "--log=log_file_name"
What is the proper way to do that when starting it with /etc/init.d?
Would it be like this? /etc/init.d/mysql start --log=log_file_name
To make it simple you can create another entry in init.d to start the mysql with that logdir path option. Make a script like
Set the log file location in the above script as per your needs and start the mysql with the following command:
This way you can use different scripts for different occasions.
You cannot pass arguments to services with startup scripting. Reason: there should be ONLY ONE argument being passed.
This argument consists of minimally only TWO choices:
Trying to configure a system to pass arguments at boot time will make your system non-standard and the cause of later configuration errors.
Usually this type of adjustment is handled in the init.d scripting by setting up variables using the /etc/sysconfig/
In otherwords, the most common process is to basically configuration files that are read-in or used by the underlying application in an init.d startup scripting. Definitely this is NOT done via adding more arguments to this type of scripting.