1Z0-908 practice question 11 of 25
MySQL programs look for option files in standard locations. Which method will show the option files and the order in which they are read?
Full set: 140 questionsThe command mysqld --help --verbose is the officially documented method to display the configuration that a MySQL program will use upon startup. It processes all standard option files in their default order of precedence and then prints a comprehensive list of variables, their values, and the specific file from which each setting was read. This output explicitly shows which option files were found and the order in which they were parsed, directly answering the question. The command prints this information and then exits without starting the server.
A. shell> mysqladmin --debug is used to generate a trace file for debugging the execution of the mysqladmin client, not for listing configuration files in their read order.
B. shell> mysql --print-defaults shows the final, consolidated set of options that the program would use, but it does not list the individual option files or the order they were read.
D. mysql> SHOW GLOBAL VARIABLES; is an SQL statement that displays the current values of server variables on a running instance, but it provides no information about their origin from configuration files.
1. MySQL 8.0 Reference Manual, Section 4.2.2.2, "Using Option Files": "To determine which option files a program reads, invoke it with the --help and --verbose options (for example, mysqld --help --verbose)." This directly confirms that option C is the correct method.
2. MySQL 8.0 Reference Manual, Section 4.3.1, "mysqld — The MySQL Server": The description for the --help (-?) and --verbose (-v) options explains that when used together, they display the server's configuration, including values from option files, and then exit.
3. MySQL 8.0 Reference Manual, Section 4.2.2.3, "Command-Line Options that Affect Option-File Handling": The documentation for --print-defaults states it causes the program to "print the program name and all options that it gets from option files." This clarifies that it shows the resulting options, not the source files.
Keep practicing
Take the free 1Z0-908 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 1Z0-908 practice questions
- Question 2You must run multiple instances of MySQL Server on a single host. Which three methods are…
- Question 3Which two tools are available to monitor the global status of InnoDB locking? (Choose two…
- Question 4Which two MySQL Server accounts are locked by default? (Choose two.)
- Question 5All MySQL Server instances belonging to InnoDB Cluster have SSL configured and enabled. Y…
- Question 6t is a non-empty InnoDB table. Examine these statements, which are executed in one sessio…
- Question 8Examine this command, which executes successfully: $ mysqlrouter --bootstrap user@hostnam…
