Determining the Options in Effect
It can sometimes be unclear which options are in effect for a
given program, particularly if you’ve got several options files with
overlapping directives. You can use the print-defaults
option to most MySQL programs
to see the options in effect. For example, to see the active options
for mysqldump
, you can type:
$
mysqldump --print-defaults
mysqldump would have been started with the following arguments: --socket=/home/mysql/server1.sock --all-databases --result_file=/tmp/dump.sql --host=localhost --port=3306 --database=Music --result_file=/home/saied/dump.sql
You can get a similar effect
using the my_print_defaults
program
and specifying the command groups you’re interested in. For example,
to see the settings for all clients and for the mysqldump
program, you can type:
$
my_print_defaults client mysqldump
--socket=/home/mysql/server1.sock --all-databases --result_file=/tmp/dump.sql --host=localhost --port=3306 --database=Music --result_file=/home/saied/dump.sql
Get Learning MySQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.