Using the --no-defaults Option
It is hard to remember by heart what every variable does. Even I cannot do it, and I work with them every day. One solution is to go to the list of options and exclude each of them one by one. But that’s not easy. Version 5.1 of MySQL has 291 variables, my outdated 5.5 installation has 321, and no one can guarantee that this value will not grow in the future. If you use a custom storage engine, it can have its own options as well.
It is much easier to check how the MySQL server should work with no
options specified, i.e., if it uses the defaults for all values. If you
have a rough guess about how mysqld
should work with no custom options set, you can start the server with the
--no-defaults option and compare the
results to those you get when custom options are set.
Warning
Both the --no-defaults and
--defaults-file options must be
specified as the first options passed to mysqld. Otherwise, the server will not recognize them.
If the results are different, start adding options that you used before one by one, and test to see if the wrong behavior comes back. Once you find which variable causes the changes, you can refer to its documentation and adjust it accordingly.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access