biotwang 发表于 2016-7-20 12:07:19

【dbdao.com MySQL OCP认证专题】- MySQL 5.6 - OCP 考题讲解 - 14

【dbdao.com MySQL OCP认证专题】- MySQL 5.6 - OCP 考题讲解

14.

You execute the following statement in a Microsoft Windows environment. There are no conflicts in the path name definitions.
C: \> mysqld –-install Mysql56 –-defaults–file=C:\my–opts.cnf
What is the expected outcome?

A. Mysqld acts as an MSI installer and installs the Mysql 5.6 version, with the c:\my-opts.cnf configuration file.
B. Mysql is installed as the Windows service name Mysql56, and uses c:\my-opts.cnf as the configuration file.
C. An error message is issued because –-install is not a valid option for mysqld.
D. A running Mysql 5.6 installation has its runtime configuration updated with the server variables set in c:\my-opts.cnf.

------------------------------------------
答案:B

分析:
首先mysqld是作为MySQL服务端主程序来运行的,它并不负责MSI安装的过程,因此A错。
通过mysqld --install可以进行Windows服务注册,同时--defaults-file用于设置启动服务端时使用的配置文件,B正确。
请注意--install命令项仅存在于Windows版MySQL的mysqld命令中,如果你是在Linux上安装MySQL是无法找到mysqld对应的--install命令项的。
C错误,因为其对于Windows版的mysqld是有效项。

D错,因此这命令不是用于安装时的配置。

参考:
http://dev.mysql.com/doc/refman/5.7/en/windows-start-service.html
页: [1]
查看完整版本: 【dbdao.com MySQL OCP认证专题】- MySQL 5.6 - OCP 考题讲解 - 14