Q131.You have upgraded the MySQL binaries from 5.7.28 to 8.0.18 by using an in-place upgrade.
Examine the message sequence generated during the first start of MySQL 8.0.18:
。。。[System]。。。/usx/sbin/mysqld (mysqld 8.0.18-commercial) starting as process 2754
。。。[System]。。。Starting upgrade of data directory. .
。。。[ERROR]。。。。Table upgrade required. Please do ‘’REPAIR TABLE ‘columns_ priv’" or dump/reload to
fix it!
。。。[ERROR]。。。Table upgrade required. Please do “REPAIR TABLE ‘event’” or dump/reload to fix it!
。。。[ERROR]。。。Table upgrade required. Please do “REPAIR TABLE ’proc’” or dump/reload to fix it!
。。。[ERROR]。。。Table upgrade required. Please do “REPAIR TABLE ’proxies_ priv’” or dump/reload to fix
it!
。。。[ERROR]。。。Table upgrade required. Please do “REPAIR TABLE ‘tables_ priv’” or dump/reload to fix it!
。。。[ERROR]。。。Failed to open mysql.event Table.
。。。[ERROR]。。。Failed to open mysql.proc Table.
。。。(ERROR]。。。Failed to Populate DD tables.
。。。[ERROR]。。。Aborting
。。。[System] 。。。 /usr/sbin/mysqld: shutdown complete (mysqld 8.0.18-commercial) MySQL Enterprise
Server - Commercial.
Which step or set of steps will resolve the errors?
A)Start mysqld again using the --upgrade=FORCE option.
B)Go to the /mysql directory and execute: myisamchk --update-state columns_ priv event proc
proxies_ priv tables_ priv.
C)Execute: mysqlcheck --repair mysql columns_ priv event proc proxies_ priv tables_ priv.
D)Remove the redo logs. Replace the MySQL binaries with the 5.7.28 binaries. Prepare the tables for upgrade.
Upgrade to 8.0.18 again.
E)Execute: mysqlcheck --check-upgrade mysql columns_priv event proc proxies_priv tables_ priv.
Answer:A
dd table是data dictionary
選項A:使mysql_upgrade已經在當前mysql版本上執行過,也忽略mysql_upgrade_info文件并強制執行mysql_upgrade
mysqlcheck只能檢查和修復表中的是否違反唯一約束等這類問題,然后進行修復,故BCD都似乎錯誤的,E選項--check-upgrade只是檢查一些權限,無法達到修復的目的
Q132.You plan to upgrade your MySQL 5.7 instance to version 8.
You have installed the 8 build of MySQL Shell.
Examine this command executed from the operating system shell prompt:
mysqlsh --uri root@localhost:3306 --util checkforserverupgrade
Which statement is true?
A)It documents any problems with your 5.7 tables to make them ready to upgrade to 8.
B)It fails because the operation name must be in camelCase.
C)It fixes any problems with your 5.7 tables to make them ready to upgrade to 8.
D)It is mandatory to clear the history of prior results before executing this process a second time or later.
E)It fails because checkForServerUpgrade must be executed only within an active shell session as a method of
the util object.
F)It is mandatory to run this command so that MySQL 8.0 software’s auto-upgrade process has the details it
needs to operate properly.
Answer:A
mysqlsh --uri root@localhost:3306 --util checkforserverupgrade可以檢查從5.7到8升級過程中出現的不兼容,已棄用的特性等信息選項A:會記錄5.7升級到8.0會出問題的表,是正確的
選項B:選項大小寫無所謂,更不用什么駝峰命名
選項C:只檢查不修復
選項D:每一次執行都會有產生自己的信息,沒必要清理之前執行后產生的結果
選項E:命令行也行
選項F:mandatory:必須,強制,該命令也不一定必須執行,只要有足夠的信息,沒有什么兼容性的問題,那就可以不執行
Q133.Database test contains a table named city that has the InnoDB storage engine.
CREATE TABLE ‘city’ (
‘ID’ int NOT NULL AUTO_ INCREMENT,
‘Name’ char(35) NOT NULL DEFAULT ‘’,
‘Countrycode’ char(3) NOT NULI DEFAULT ‘’,
‘District’ char (20) NOT NULI DEFAULT ’ ',
‘Population’ int NOT NULI DEFAULT ‘0’,
PRIMARY KEY(‘ID’),
KEY ‘CountryCode’ (
’ Countrycode’ )
) ENGINE= InnoDB TABLESPACE=innodb_file_per_table;
What is the content of the test folder in the data directory?
A)city.MYD, city.MYI, and city.sdi
B)city.ibd
C)city. ibd and city.sdi
D)city. ibd and city. frm
E)city.ibd, city.frm, and city.sdi
Answer:B
frm:是描述表結構的文件。在8.0之前包含MySQL表的元數據,例如表定義。元數據是關于數據的數據,表定義則包含了表的結構信息,像表中有多少列、每列的數據類型、列的名稱等,在8.0之后,這些信息存儲在數據字典表中
MYD:存儲myIsam數據的文件
MYI:存儲myIsam數據表的索引信息
ibd:包含innodb的表數據和索引文件
sdi:序列化數據目錄信息(SDI),SDI是表和表空間對象的序列化元數據。,存儲了innodb表的元數據,在表空間中存儲
以上表中是innodb表,所以會有ibd文件,sdi存儲在表空間中,所以在test數據庫路徑下看不到
Q134.Which two MySQL Shell commands are excluded from the InnoDB Cluster creation procedure?
A)cluster.addInstance()
B)dba.configureLocalInstance()
C)dba.checkInstanceConfiguration()
D)cluster.setPrimaryInstance()
E)dba.configureInstance 0)
F)dba.createCluster()
G)cluster.forceQuorumUsingPartitionOf()
Answer:DG
選項A:此命令用于將新實例添加到已創建的集群中,是集群創建和管理過程的一部分
選項B:此命令用于配置本地實例以加入集群,通常在創建集群之前或過程中使用
選項C:此命令用于檢查實例是否適合加入集群,通常在創建集群之前使用。
選項D:此命令用于設置或更改集群的主實例,通常在集群創建之后用于管理集群,而不是集群創建過程的一部分
選項E:此命令用于配置實例以確保其適合加入集群,通常在創建集群之前使用。
選項F:此命令用于實際創建 InnoDB Cluster,是集群創建過程的核心步驟
選項G:此命令用于在網絡分區或故障情況下強制設置仲裁,以恢復集群的正常運行,不屬于常規的集群創建過程。
Q135.Which four connection methods can MySQL clients specify with the --protocol option when connecting to a
MySQL server?
A)IPv4
B)SOCKET
C)MEMORY
D)PIPE
E)IPv6
F)FILEO
G)TCP
H)DIRECT
Answer:BCDG
Q136.Which two authentication plugins require the plaintext client plugin for authentication to work?
A)LDAP authentication
B)SHA256 authentication
C)Windows Native authentication
D)PAM authentication
E)MySQL Native Password
F)LDAP SASL authentication
Answer:AD
Hashing or encryption cannot be done for authentication schemes that require the server to receive the password as entered on the client side. In such cases, the client-side mysql_clear_password plugin is used, which enables the client to send the password to the server as cleartext. There is no corresponding server-side plugin. Rather, mysql_clear_password can be used on the client side in concert with any server-side plugin that needs a cleartext password. (Examples are the PAM and simple LDAP authentication plugins; see Section 8.4.1.5, “PAM Pluggable Authentication”, and Section 8.4.1.7, “LDAP Pluggable Authentication”.)對于那些需要服務器以客戶端輸入的形式接收密碼的身份驗證方案,無法進行哈希或加密。在這種情況下,客戶端會使用mysql_clear_password插件,該插件允許客戶端將密碼以明文形式發送給服務器。沒有對應的服務器端插件。相反,mysql_clear_password可以在客戶端與任何需要明文密碼的服務器端插件配合使用(例如PAM可插拔身份驗證插件和簡單的LDAP身份驗證插件;參考:https://dev.mysql.com/doc/refman/8.4/en/cleartext-pluggable-authentication.html
Q137.Where is the default data directory located after installing MySQL using RPM on Oracle Linux 7?
A)/usr
B)/usr/mysql
C)/etc/my.cnf
D)/var/lib/mysql
E)/usr/bin
Answer:D
Q138.You must store connection parameters for connecting a Linux-based MySQL client to a remote Windows-based MySQL server listening on port 3309.
Which four methods can be used to configure user, host, and database parameters?
A) Execute the command in a bash script.
B) Embed login information into the SSH tunnel definition.
C) Define a UNIX socket.
D) Execute mysql_config_editor to configure the user connection.
E) Configure~/.ssh/config for public key authentication.
F) Use the usermod program to store static user information.
G) Execute the mysqladmin command to confiaure the user connection.
H) Configure~/.my.cnf.
- Configure environment variables
Answer:ADHI
可以使用bash腳本,mysql_config_editor工具,環境變量,或者配置在~/.my.cnf存儲連接用戶的名稱,ip數據庫等連接信息
Q139.You plan to install MySQL Server by using the RPM download.
Which two statements are true?
A)You must manually initialize the data directory.
B)You can provide the root password interactively.
C)The MySQL RPM package installation supports deploying multiple MySQL versions on the same host.
D)MySQL uses the RPM relocatable installation target feature.
E)You can find the root password in the error log after the first start.
F)The functionality is split among several RPM package files.
Answer:EF
RPM安裝步驟:
1.下載RPM安裝包
2.查看安裝包:$> rpm -qpl mysql-community-server-version-distribution-arch.rpm
3.安裝:$> sudo yum install mysql-community-{server,client,client-plugins,icu-data-files,common,libs}-*
4.啟動:$> systemctl start mysqld
5.查看臨時密碼:$> sudo grep 'temporary password' /var/log/mysqld.log從這個過程中可以看到,
選項A:不需要手動創建data路徑
選項B:也不需要交互式的提供密碼
選項C:RPM不支持單機多實例,因為需要不同的實例間需要不同的配置
選項D:RPM安裝都是默認位置,也沒有重新定位 安裝目標路徑
選項E:在error log中查看密碼是正確的
選項F:功能分布在多個 RPM 軟件包文件中。也是正確的,可以看到安裝的時候需要安裝不同的包
Q140.Examine this MySQL Shell command:
dba.rebootClusterFromCompleteOutage ()
Which two statements are true? (Choose two.)
A)It reconfigures InnoDB Cluster if the cluster was stopped.
B)It performs InnoDB Cluster instances rolling restart.
C)It only starts all InnoDB Cluster instances.
D)It is not mandatory that all instances are running and reachable before running the command.
E)It stops and restarts all InnoDB Cluster instances and initializes the metadata.
F)It only stops and restarts all InnoDB Cluster instances.
G)It picks the minimum number of instances necessary to rebuild the quorum and reconfigures InnoDB Cluster.
Answer:AD
rebootClusterFromCompleteOutage()是MySQL Shell中的一個實用命令,用于在 InnoDB 集群遇到完全中斷 (例如,當組復制在所有成員實例上停止時)后重新配置和恢復集群。這個命令允許你連接到集群中的一個 MySQL 實例,并使用該實例的元數據來恢復整個集群。選項A:正確
選項D:可以在某一個實例上運行該命令,所以不需要強制所有實例都是running狀態和可達的