0
0
MySQLquery~10 mins

Secure connection (SSL) in MySQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the SSL mode for a secure MySQL connection.

MySQL
mysql --host=example.com --user=user --password=pass --ssl-mode=[1]
Drag options to blanks, or click blank then click option'
ADISABLED
BREQUIRED
CNONE
DOFF
Attempts:
3 left
💡 Hint
Common Mistakes
Using DISABLED or NONE disables SSL, making connection insecure.
Using OFF is not a valid ssl-mode option.
2fill in blank
medium

Complete the code to specify the path to the CA certificate for SSL verification.

MySQL
mysql --host=example.com --user=user --password=pass --ssl-ca=[1]
Drag options to blanks, or click blank then click option'
A/etc/mysql/ca.pem
B/var/lib/mysql/client-key.pem
C/home/user/client-cert.pem
D/tmp/mysql.sock
Attempts:
3 left
💡 Hint
Common Mistakes
Using client key or cert files for --ssl-ca option.
Using socket file path instead of certificate.
3fill in blank
hard

Fix the error in the command to enable SSL with client certificate and key.

MySQL
mysql --host=example.com --user=user --password=pass --ssl-cert=[1] --ssl-key=/home/user/client-key.pem
Drag options to blanks, or click blank then click option'
A/etc/mysql/ca.pem
B/home/user/client-key.pem
C/home/user/client-cert.pem
D/tmp/mysql.sock
Attempts:
3 left
💡 Hint
Common Mistakes
Using client key file for --ssl-cert option.
Mixing up CA certificate with client cert.
4fill in blank
hard

Fill both blanks to configure a secure MySQL connection with SSL mode and CA certificate.

MySQL
mysql --host=example.com --user=user --password=pass --ssl-mode=[1] --ssl-ca=[2]
Drag options to blanks, or click blank then click option'
AREQUIRED
BDISABLED
C/etc/mysql/ca.pem
D/home/user/client-key.pem
Attempts:
3 left
💡 Hint
Common Mistakes
Using DISABLED disables SSL.
Using client key file for CA certificate option.
5fill in blank
hard

Fill all three blanks to connect securely with SSL mode, client cert, and client key.

MySQL
mysql --host=example.com --user=user --password=pass --ssl-mode=[1] --ssl-cert=[2] --ssl-key=[3]
Drag options to blanks, or click blank then click option'
ADISABLED
B/home/user/client-cert.pem
C/home/user/client-key.pem
DREQUIRED
Attempts:
3 left
💡 Hint
Common Mistakes
Using DISABLED disables SSL.
Swapping client cert and key file paths.