帶你掌握MySQL安全性相關(guān)試題及答案_第1頁
帶你掌握MySQL安全性相關(guān)試題及答案_第2頁
帶你掌握MySQL安全性相關(guān)試題及答案_第3頁
帶你掌握MySQL安全性相關(guān)試題及答案_第4頁
帶你掌握MySQL安全性相關(guān)試題及答案_第5頁
已閱讀5頁,還剩6頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

帶你掌握MySQL安全性相關(guān)試題及答案姓名:____________________

一、單項(xiàng)選擇題(每題2分,共10題)

1.MySQL中,以下哪個(gè)命令可以用來查看當(dāng)前數(shù)據(jù)庫的安全相關(guān)配置?

A.showvariableslike'secure';

B.showvariableslike'password';

C.showvariableslike'user';

D.showvariableslike'grant';

2.在MySQL中,以下哪個(gè)命令可以用來修改用戶密碼?

A.alteruser'root'@'localhost'identifiedby'new_password';

B.updateusersetpassword='new_password'whereuser='root'andhost='localhost';

C.setpasswordfor'root'@'localhost'=password('new_password');

D.changeuser'root'@'localhost'identifiedby'new_password';

3.MySQL中,以下哪個(gè)選項(xiàng)表示用戶在連接到數(shù)據(jù)庫時(shí)需要使用SSL連接?

A.ssl_cipher='DHE-RSA-AES256-SHA';

B.ssl=1;

C.require_secure_transport=1;

D.ssl_verify_server_cert=1;

4.以下哪個(gè)選項(xiàng)可以用來設(shè)置MySQL服務(wù)器的默認(rèn)字符集?

A.setcharacter_set_server='utf8';

B.setdefault_storage_engine=InnoDB;

C.character_set_server='utf8';

D.character_set_client='utf8';

5.MySQL中,以下哪個(gè)選項(xiàng)表示用戶可以從遠(yuǎn)程主機(jī)連接到數(shù)據(jù)庫?

A.grantallon*.*to'user'@'%'identifiedby'password';

B.grantallon*.*to'user'@'localhost'identifiedby'password';

C.grantallon*.*to'user'@'localhost.localdomain'identifiedby'password';

D.grantallon*.*to'user'@'192.168.1.1'identifiedby'password';

6.以下哪個(gè)選項(xiàng)可以用來禁用MySQL的遠(yuǎn)程訪問?

A.setglobalallow_remote_login=0;

B.setglobalallow_remote_connections=0;

C.setglobalremote_allow=0;

D.setglobalallow_remote=0;

7.MySQL中,以下哪個(gè)命令可以用來刪除用戶?

A.dropuser'user'@'localhost';

B.deletefrommysql.userwhereuser='user'andhost='localhost';

C.alteruser'user'@'localhost'drop;

D.deletefrommysql.userwhereuser='user'andhost='%';

8.以下哪個(gè)選項(xiàng)表示MySQL服務(wù)器在啟動(dòng)時(shí)會(huì)自動(dòng)加載SSL模塊?

A.--ssl

B.--ssl-ca

C.--ssl-cert

D.--ssl-key

9.MySQL中,以下哪個(gè)選項(xiàng)表示用戶不能從遠(yuǎn)程主機(jī)連接到數(shù)據(jù)庫?

A.grantallon*.*to'user'@'localhost'identifiedby'password';

B.grantallon*.*to'user'@'%'identifiedby'password';

C.grantallon*.*to'user'@'localhost.localdomain'identifiedby'password';

D.grantallon*.*to'user'@'192.168.1.1'identifiedby'password';

10.以下哪個(gè)選項(xiàng)可以用來設(shè)置MySQL服務(wù)器的默認(rèn)時(shí)區(qū)?

A.settime_zone='Asia/Shanghai';

B.setglobaltime_zone='Asia/Shanghai';

C.setlocal_time_zone='Asia/Shanghai';

D.settime_zone_server='Asia/Shanghai';

二、多項(xiàng)選擇題(每題3分,共10題)

1.在MySQL中,以下哪些命令可以用來查看數(shù)據(jù)庫的安全相關(guān)配置?

A.showvariableslike'secure';

B.showvariableslike'password';

C.showvariableslike'user';

D.showvariableslike'grant';

E.showvariableslike'character_set_server';

2.以下哪些選項(xiàng)可以用來設(shè)置MySQL服務(wù)器的默認(rèn)字符集?

A.setcharacter_set_server='utf8';

B.setdefault_storage_engine=InnoDB;

C.character_set_server='utf8';

D.character_set_client='utf8';

E.collation_server='utf8_general_ci';

3.在MySQL中,以下哪些命令可以用來修改用戶密碼?

A.alteruser'root'@'localhost'identifiedby'new_password';

B.updateusersetpassword='new_password'whereuser='root'andhost='localhost';

C.setpasswordfor'root'@'localhost'=password('new_password');

D.changeuser'root'@'localhost'identifiedby'new_password';

E.updatemysql.usersetpassword='new_password'whereuser='root'andhost='localhost';

4.以下哪些選項(xiàng)可以用來設(shè)置MySQL服務(wù)器的默認(rèn)時(shí)區(qū)?

A.settime_zone='Asia/Shanghai';

B.setglobaltime_zone='Asia/Shanghai';

C.setlocal_time_zone='Asia/Shanghai';

D.settime_zone_server='Asia/Shanghai';

E.settime_zone='UTC';

5.在MySQL中,以下哪些命令可以用來刪除用戶?

A.dropuser'user'@'localhost';

B.deletefrommysql.userwhereuser='user'andhost='localhost';

C.alteruser'user'@'localhost'drop;

D.deletefrommysql.userwhereuser='user'andhost='%';

E.dropuser'user'@'localhost.localdomain';

6.以下哪些選項(xiàng)可以用來設(shè)置MySQL服務(wù)器的SSL連接?

A.ssl_cipher='DHE-RSA-AES256-SHA';

B.ssl=1;

C.require_secure_transport=1;

D.ssl_verify_server_cert=1;

E.ssl_ca='/path/to/ca.pem';

7.在MySQL中,以下哪些選項(xiàng)可以用來禁用遠(yuǎn)程訪問?

A.setglobalallow_remote_login=0;

B.setglobalallow_remote_connections=0;

C.setglobalremote_allow=0;

D.setglobalallow_remote=0;

E.grantallon*.*to'user'@'localhost'identifiedby'password';

8.以下哪些選項(xiàng)可以用來設(shè)置MySQL服務(wù)器的root用戶密碼?

A.alteruser'root'@'localhost'identifiedby'new_password';

B.updateusersetpassword='new_password'whereuser='root'andhost='localhost';

C.setpasswordfor'root'@'localhost'=password('new_password');

D.changeuser'root'@'localhost'identifiedby'new_password';

E.updatemysql.usersetpassword='new_password'whereuser='root'andhost='localhost';

9.在MySQL中,以下哪些選項(xiàng)可以用來設(shè)置用戶只能從特定主機(jī)連接到數(shù)據(jù)庫?

A.grantallon*.*to'user'@'localhost'identifiedby'password';

B.grantallon*.*to'user'@'%'identifiedby'password';

C.grantallon*.*to'user'@'localhost.localdomain'identifiedby'password';

D.grantallon*.*to'user'@'192.168.1.1'identifiedby'password';

E.grantallon*.*to'user'@'192.168.1.%'identifiedby'password';

10.以下哪些選項(xiàng)可以用來設(shè)置MySQL服務(wù)器的默認(rèn)存儲(chǔ)引擎?

A.setdefault_storage_engine=InnoDB;

B.altertabletable_nameengine=InnoDB;

C.showengines;

D.setglobaldefault_storage_engine=InnoDB;

E.updatemysql.enginessetdefault='InnoDB'whereengine='InnoDB';

三、判斷題(每題2分,共10題)

1.在MySQL中,設(shè)置root用戶的密碼必須使用setpassword命令。(×)

2.MySQL的root用戶默認(rèn)可以從任何主機(jī)連接到數(shù)據(jù)庫。(√)

3.在MySQL中,字符集配置character_set_server和character_set_client是相同的。(×)

4.MySQL的SSL連接可以通過ssl_cipher變量來配置加密算法。(√)

5.MySQL的遠(yuǎn)程訪問可以通過設(shè)置全局變量allow_remote_login來禁用。(√)

6.刪除用戶時(shí),可以使用dropuser命令或delete語句直接在mysql.user表中操作。(√)

7.MySQL的默認(rèn)時(shí)區(qū)可以通過setglobaltime_zone命令來設(shè)置。(√)

8.MySQL的默認(rèn)存儲(chǔ)引擎可以通過setdefault_storage_engine命令來設(shè)置。(√)

9.在MySQL中,可以通過grant命令來給用戶授予從遠(yuǎn)程主機(jī)連接的權(quán)限。(√)

10.MySQL的root用戶密碼可以通過updatemysql.user表來修改。(√)

四、簡(jiǎn)答題(每題5分,共6題)

1.簡(jiǎn)述MySQL中如何配置SSL連接。

2.列舉至少三種MySQL中用于管理用戶和權(quán)限的命令。

3.解釋MySQL中的安全相關(guān)變量,如secure_auth、password_history等的作用。

4.描述如何修改MySQL服務(wù)器的默認(rèn)字符集。

5.簡(jiǎn)要說明如何設(shè)置MySQL服務(wù)器的默認(rèn)存儲(chǔ)引擎。

6.闡述在MySQL中如何啟用或禁用遠(yuǎn)程訪問。

試卷答案如下

一、單項(xiàng)選擇題(每題2分,共10題)

1.A

解析思路:showvariableslike'secure'用于查看安全相關(guān)配置。

2.C

解析思路:setpasswordfor'user'@'host'=password('password')是修改用戶密碼的常用命令。

3.B

解析思路:ssl表示是否啟用SSL連接。

4.C

解析思路:character_set_server設(shè)置服務(wù)器的默認(rèn)字符集。

5.B

解析思路:'%'表示所有主機(jī)。

6.A

解析思路:setglobalallow_remote_login=0禁用遠(yuǎn)程登錄。

7.A

解析思路:dropuser'user'@'host'是刪除用戶的命令。

8.A

解析思路:--ssl是啟動(dòng)MySQL時(shí)自動(dòng)加載SSL模塊的選項(xiàng)。

9.D

解析思路:'192.168.1.1'表示特定的遠(yuǎn)程主機(jī)。

10.A

解析思路:settime_zone='time_zone'設(shè)置服務(wù)器的默認(rèn)時(shí)區(qū)。

二、多項(xiàng)選擇題(每題3分,共10題)

1.A,B,C,D,E

解析思路:這些命令都能查看數(shù)據(jù)庫的安全相關(guān)配置。

2.A,C,D,E

解析思路:這些選項(xiàng)可以設(shè)置MySQL服務(wù)器的默認(rèn)字符集。

3.A,B,C,D

解析思路:這些命令可以用來修改用戶密碼。

4.A,B,C,D

解析思路:這些選項(xiàng)可以設(shè)置MySQL服務(wù)器的默認(rèn)時(shí)區(qū)。

5.A,B,D,E

解析思路:這些命令可以用來刪除用戶。

6.A,B,C,D,E

解析思路:這些選項(xiàng)可以用來設(shè)置MySQL服務(wù)器的SSL連接。

7.A,B,C,D

解析思路:這些選項(xiàng)可以用來禁用遠(yuǎn)程訪問。

8.A,B,C,D

解析思路:這些命令可以用來設(shè)置MySQL的root用戶密碼。

9.A,B,C,D,E

解析思路:這些選項(xiàng)可以用來設(shè)置用戶只能從特定主機(jī)連接到數(shù)據(jù)庫。

10.A,B,C,D,E

解析思路

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論