Which of the following statements will you use to accomplish the task?

You are the database administrator for a MySQL database. The database server is installed on a Unix
system. The time zone files for the system are located at /usr/share/zoneinfo. You need to ensure
that the system and MySQL time zones are based on the same information. Which of the following
statements will you use to accomplish the task?

You are the database administrator for a MySQL database. The database server is installed on a Unix
system. The time zone files for the system are located at /usr/share/zoneinfo. You need to ensure
that the system and MySQL time zones are based on the same information. Which of the following
statements will you use to accomplish the task?

A.
shell> /ust/share/zoneinfo mysql_tzinfo_to_sql | mysql -u root mysql

B.
shell> /ust/share/zoneinfo mysql_tz_to_sql | mysql -u root mysql

C.
shell> mysql_tz_to_sql /ust/share/zoneinfo | mysql -u root mysql

D.
shell> mysql_tzinfo_to_sql /ust/share/zoneinfo | mysql -u root mysql

Explanation:
According to the question, you are required to ensure that the system and MySQL time zones are
based on the same information. To ensure this, on operating systems that have their own time zone
files, it is best to use them for loading the MySQL time zone tables. Furthermore, the
question also provides information that the system time zone files are located at
/usr/share/zoneinfo location. In order to accomplish this
task, you will have to use the mysql_tzinfo_to_sql program to convert the file contents into SQL
statements that can be loaded into MySQL by
the mysql program. Use the following command for this:
shell> mysql_tzinfo_to_sql /ust/share/zoneinfo | mysql -u root mysql
Answer A is incorrect. Wrong syntax is used.
Answer C and B are incorrect. No such command is available with MySQL.



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Lena

Lena

mysql_tzinfo_to_sql is a utility that is used to load time zones on systems that have a zoneinfo database