Sunday, 2 February 2020

MySQL Multiple Choice Question

1. Which of the following is not one of the top databases in use today?
(a) Amazon CloudIt
(b) Microsoft SQL Server
(c) Oracle
(d) MySQL
(e) MongoDB
Solution:
A (Amazon CloudIt)

Explanation : Microsoft SQL server, Oracle, and MySQL are relational databases. MongoDB is non relational databases. Amazon CloudIt is not a database.
2. MySQL is free to use as a back-end database for a website.
(a) True
(b) False

Solution:
 True

  Explanation : MySQL is free to use as a back-end database for a website.

3. MySQL uses which TCP/IP port by default?
Solution:
MySQL uses 3306 TCP/IP port by default.

4. MySQL is primarily a relational database based on SQL.
(a) True
(b) False
Solution:
True

Explanation : MySQL is primarily a relational database based on Structured Query Language (SQL).

5. Which of the following is correct about this command: mysql -u root -p?
(a) Installs MySQL for the first time
(b) Starts the MySQL Service in Linux
(c) Starts the MySQL Service in Windows
(d) Configures MySQL to like rootbeer
(e) Connects to MySQL on localhost
Solution:
E) Connects to MySQL on localhost

Explanation : 'mysql -u root -p' command is used to connect to MySQL on localhost. To connect to remote host we have to use -h option. 'mysql -h <remote-ip> -u <user> -p
6. The MySQL Configuration file for Windows is:
(a) my.cnf
(b) mysql.prop
(c) my.ini
(d) my.conf
(e) mysql.conf
Solution:
c (my.ini)
7. The MySQL Configuration file for Linux is:
(a) my.cnf
(b) mysql.prop
(c) my.ini
(d) my.conf
(e) mysql.conf
Solution:
a (my.cnf)

Explanation : we can define most of MySQL's configuration parameters in the my.cnf file which is located in /etc/mysql folder.

No comments:

Post a Comment