MySQL Questions and Answers – Access Control and Security

This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Access Control and Security”.

1. MySQL uses security based on ACL which stands for ______________
a) Access Control Language
b) Access Control Lists
c) Automatic Control Lists
d) Automatic Control Language
View Answer

Answer: b
Explanation: MySQL uses security based on Access Control Lists (ACLs) for all connections, queries and other operations that users can attempt to perform. There is support for SSL encrypted connections.

2. The mysql client writes a record of executed statements to a history file on Unix.
a) True
b) False
View Answer

Answer: a
Explanation: On Unix the mysql client writes a record of the executed statements to a history file. By default this file is named as ‘.mysql_history’. It is created in the home directory.

3. A password applies globally to an account.
a) True
b) False
View Answer

Answer: a
Explanation: In the MySQL privilege system, a password applies globally to an account. A password cannot be explicitly associated with a specific object such as a database, table, or routine.
advertisement
advertisement

4. The context in which the privilege ‘CREATE TABLESPACE’ applies is ______________
a) Server administration
b) Tables
c) Stored routines
d) Views
View Answer

Answer: a
Explanation: The column name associated with the privilege ‘CREATE TABLESPACE’ is ‘Create_tablespace_priv’. The context in which this privilege is being used is the server administration.

5. The number of languages that have interfaces to bind to the C API of MySQL among these is ______________

Perl, PHP, Python
Note: Join free Sanfoundry classes at Telegram or Youtube

a) 0
b) 1
c) 2
d) 3
View Answer

Answer: d
Explanation: The client library provides the means through which the MySQL bindings for other languages can be built on top of the C API. This type of interface exists for Perl, PHP, Python and others.

6. The language that is the core for APIs and communication in MySQL is ______________
a) C
b) C++
c) Python
d) Ruby
View Answer

Answer: a
Explanation: In order to provide application development, MySQL provides a client library written in the C programming language. It enables access to MySQL databases from a C program.
advertisement

7. The most general purpose language is ______________
a) C
b) Perl
c) Python
d) PHP
View Answer

Answer: a
Explanation: C is a general purpose language, so in principle, it can be used for anything. C tends to be used more often for standalone programs rather than for Web programming in practice.

8. The language in which image processing is least simple is ______________
a) PHP
b) Perl
c) Python
d) C
View Answer

Answer: d
Explanation: It is not as easy to perform text processing and memory management in C than it is in languages like Perl and PHP. These capabilities tend to be heavily used in web applications.
advertisement

9. The option necessary to compile a C program havin math functions is ______________
a) -lm
b) -ln
c) -lp
d) -lq
View Answer

Answer: a
Explanation: To compile a program written in the C language, it is compiled by issuing the option ‘-lm’. The examples of some math functions found in ‘math.h’ are floor(), sqrt(), pow(), log().

10. What is the option for specifying the executable name while compiling with gcc?
a) -e
b) -o
c) -a
d) -b
View Answer

Answer: b
Explanation: When a C program is compiled with gcc, the option -o is issued in order to specify the name of the executable that is created after compilation. The default name given is ‘a.out’.

Sanfoundry Global Education & Learning Series – MySQL Database.

To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.