51.
Which command provides the easiest solution to apply basic security settings
to MariaDB after installing it?
- A.Modify settings in the my.cnf configuration file
- B.Modify /etc/sysconfig/mariadb and set the parameter CHROOT=yes
- C.Run the mysql_secure_installation command after installation
- D.Enable the SELinux mysql policy module using semodule -i mysql
- Answer & Explanation
- Report
Answer : [C]
Explanation :
Explanation :
The mysql_secure_installation command goes through a few steps to set up basic security settings. |
52.
Which of the following parameters in my.cnf should you modify to enable full
network access to MariaDB databases?
- A.Set the bind address to ::.
- B.Set skip-networking to 1.
- C.Disable connections through sockets.
- D.Use firewall-cmd --enable mysql to open the firewall.
- Answer & Explanation
- Report
Answer : [A]
Explanation :
Explanation :
By default, MariaDB listens on the loopback address only. Set the bind address to :: to enable MariaDB on IPv4 as well as on IPv6. |
53.
Which command should you use to log in to the database using administrative
permissions?
- A.mariadb -u admin -p
- B.mysql -u root
- C.mysql -u root -p
- D.mysql admin@localhost -p
- Answer & Explanation
- Report
Answer : [C]
Explanation :
Explanation :
The default administrative user for mysql is root; use -p to prompt for a password. |
54.
You want to add a user account to the current database. To do so, you need to
find out the current attributes for users, which are created in a table with the
name users. Which command can you use to show these attributes?
- A.describe users;
- B.show attributes for users;
- C.list users;
- D.select users;
- Answer & Explanation
- Report
Answer : [A]
Explanation :
Explanation :
The describe users; command gives information about information currently stored in the users table. |
55.
Which of the following shows correct syntax to add a user into the users table?
- A.INSERT INTO user (Host,User,Password) VALUES (localhost,linda,password)
- B.INSERT INTO user (Host,User,Password) VALUES (localhost,linda,password);
- C.INSERT INTO user (Host,User,Password) VALUES (‘localhost’, ’linda’,’password’);
- D.INSERT INTO user (Host,User,Password) VALUES (‘localhost’, ’linda’,’password’;)
- Answer & Explanation
- Report
Answer : [C]
Explanation :
Explanation :
Commands need to be closed with a semicolon. All values that need to be inserted in tables need to be put between single quotes. |