If you look at the MySQL documentation, you will notice the following line:
Any long option that may be given on the command line when running a
MySQL program can be given in an option file as well. To get the list
of available options for a program, run it with the --help option.
Further details clarify the above statement:
The syntax for specifying options in an option file is similar to
command-line syntax.. However, in an option file, you omit the leading
two dashes from the option name and you specify only one option per
line. For example, --quick and --host=localhost on the command line
should be specified as quick and host=localhost on separate lines in
an option file. To specify an option of the form --loose-opt_name in
an option file, write it as loose-opt_name.
The list of options, therefore, is provided in the MAN page for the appropriate program (e.g. the 'mysql' section or the mysqld section, etc. or by running
mysql --help or
mysqld --verbose --help) (Also see the MySQL Docs for replication specific options: Slave and Master)
For instance, for your two examples:
The server ID. This value is set by the --server-id option. It is
used for replication to enable master and slave servers to identify
themselves uniquely. This variable was added in MySQL 3.23.26.
The basename for the relay log. The default basename is host_name-relay-bin.
The server writes the file in the data directory unless the basename is given
with a leading absolute path name to specify a different directory. The server
creates relay log files in sequence by adding a numeric suffix to the basename.