Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the general statement-issuing routine?(a) mysql_real_query()(b) mysql_query_real()(c) mysql_image_query()(d) mysql_query_image()I got this question in an interview for job.This is a very interesting question from Database Maintenance, Backups and Replication in portion MySQL Administration of MySQL

Answer»

Correct CHOICE is (a) mysql_real_query()

To elaborate: The general STATEMENT-issuing ROUTINE is mysql_real_query(). The statement is PROVIDED as a counted string (a string plus a length). The length of the statement string MUST be kept track of.

2.

The header that should be included first is ______________(a) my_global.h(b) my_sys.h(c) mysql.h(d) my_local.hI have been asked this question in an online interview.Query is from Database Maintenance, Backups and Replication topic in division MySQL Administration of MySQL

Answer»

Correct answer is (a) my_global.h

Explanation: The file ‘my_global.h’ takes care of including several other HEADER files that are likely to be GENERALLY useful, like ‘stdio.h’. It also INCLUDES WINDOWS compatibility information.

3.

The library file that contains various portability macros and definitions is ______________(a) my_global.h(b) my_sys.h(c) mysql.h(d) my_local.hI have been asked this question during an online exam.I want to ask this question from Database Maintenance, Backups and Replication topic in division MySQL Administration of MySQL

Answer» RIGHT option is (B) my_sys.h

Explanation: The ‘my_sys.h’ header file contains a variety of PORTABILITY macros and definitions required for structures and functions. These structures and functions are used by the CLIENT library.
4.

SBR replication is ______________(a) Statement based(b) Row based(c) Column based(d) Table basedThe question was asked in an interview.My enquiry is from Database Maintenance, Backups and Replication topic in chapter MySQL Administration of MySQL

Answer»

The correct ANSWER is (a) Statement based

For explanation: There are two main kinds of replication format: Statement Based Replication (SBR) REPLICATES entire SQL STATEMENTS and Row Based Replication (RBR) replicates only the changed rows.

5.

Replication enables data from one MySQL database server to be copied to one or more MySQL database servers.(a) True(b) FalseI had been asked this question in homework.Asked question is from Database Maintenance, Backups and Replication in division MySQL Administration of MySQL

Answer»

Right choice is (a) True

The best I can explain: Replication enables DATA from one MySQL DATABASE server (the MASTER) to be COPIED to one or more MySQL database servers (the slaves). Replication is asynchronous by default.

6.

To reload a delimited text data file use ______________(a) mysqldump(b) mysqld(c) mysqlimport(d) mysqlnaiveThis question was posed to me in a job interview.The above asked question is from Database Maintenance, Backups and Replication topic in division MySQL Administration of MySQL

Answer»

Right option is (C) MYSQLIMPORT

Explanation: A WAY to create text data files along with files CONTAINING ‘CREATE TABLE’ statements for the backed up tables is to USE ‘mysqldump’ with –tab. To reload a delimited text data file ‘mysqlimport’ is used.

7.

For InnoDB tables in mysqldump an online backup that takes no locks on tables can be performed by ______________(a) –multiple-transaction(b) –single-transaction(c) –double-transaction(d) –no-transactionI have been asked this question in examination.The doubt is from Database Maintenance, Backups and Replication in chapter MySQL Administration of MySQL

Answer»

Right answer is (b) –single-transaction

Explanation: For InnoDB tables it is possible to perform an ONLINE backup that TAKES no locks on tables using the OPTION ‘–single-transaction’ to ‘mysqldump’. The ‘mysqldump’ can MAKE backups.

8.

What is the option for specifying the executable name while compiling with gcc?(a) -e(b) -o(c) -a(d) -bI had been asked this question during an interview for a job.Question is from Access Control and Security topic in chapter MySQL Administration of MySQL

Answer»

Right choice is (B) -o

Easy 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’.

9.

The option necessary to compile a C program havin math functions is ______________(a) -lm(b) -ln(c) -lp(d) -lqThe question was posed to me during an online exam.Query is from Access Control and Security in division MySQL Administration of MySQL

Answer»

The correct choice is (a) -LM

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.

The language in which image processing is least simple is ______________(a) PHP(b) Perl(c) Python(d) CI got this question in homework.I'm obligated to ask this question of Access Control and Security topic in division MySQL Administration of MySQL

Answer»

The correct choice is (d) C

For 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.

11.

The most general purpose language is ______________(a) C(b) Perl(c) Python(d) PHPI had been asked this question in an online quiz.Question is from Access Control and Security topic in chapter MySQL Administration of MySQL

Answer» CORRECT CHOICE is (a) C

The best I can explain: 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.
12.

The language that is the core for APIs and communication in MySQL is ______________(a) C(b) C++(c) Python(d) RubyThe question was posed to me in an interview for internship.The query is from Access Control and Security in division MySQL Administration of MySQL

Answer»

The correct ANSWER is (a) C

The 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.

13.

The context in which the privilege ‘CREATE TABLESPACE’ applies is ______________(a) Server administration(b) Tables(c) Stored routines(d) ViewsThis question was addressed to me during an interview.The doubt is from Access Control and Security topic in portion MySQL Administration of MySQL

Answer»

Right answer is (a) Server administration

The best I can explain: 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.

14.

A password applies globally to an account.(a) True(b) FalseThe question was asked in an international level competition.I want to ask this question from Access Control and Security in division MySQL Administration of MySQL

Answer»

The correct option is (a) True

To EXPLAIN: 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.

15.

The mysql client writes a record of executed statements to a history file on Unix.(a) True(b) FalseThis question was posed to me in semester exam.The above asked question is from Access Control and Security in portion MySQL Administration of MySQL

Answer»

Right option is (a) True

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.

16.

MySQL uses security based on ACL which stands for ______________(a) Access Control Language(b) Access Control Lists(c) Automatic Control Lists(d) Automatic Control LanguageThe question was asked during an internship interview.I want to ask this question from Access Control and Security topic in chapter MySQL Administration of MySQL

Answer»

The correct choice is (b) ACCESS Control Lists

Easiest 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.

17.

Which of these exports table definitions and contents?(a) mysqldump(b) mysqladmin(c) mysqlimport(d) mysqlexportThis question was posed to me in homework.This intriguing question originated from General MySQL Administration topic in section MySQL Administration of MySQL

Answer»

Right choice is (a) mysqldump

Best explanation: In MYSQL, some DISTRIBUTIONS INCLUDE a SET of some CLIENT programs. ‘mysqldump’ exports the table definitions and the contents. ‘mysqladmin’ performs adminisitrative tasks.

18.

The system variable controls the size of the table cache _________________(a) table_cache(b) cache_table(c) open_cache(d) cache_openThis question was posed to me in an internship interview.My question comes from General MySQL Administration topic in section MySQL Administration of MySQL

Answer»

The CORRECT choice is (a) table_cache

The explanation is: In MYSQL, when the server OPENS table files it keeps them open to minimize the number of file-opening operations. It maintains INFORMATION about open files in the table CACHE.

19.

The max_binlog_cache_size system variable has default size ______________(a) 1 GB(b) 2 GB(c) 4 GB(d) 8 GBThe question was asked in an interview.I would like to ask this question from General MySQL Administration in section MySQL Administration of MySQL

Answer»

The correct option is (c) 4 GB

Easy explanation: The max_binlog_cache_size system variable can be USED to restrict the total size used to cache a multiple-statement transaction. If transaction is larger than this it FAILS and ROLLS BACK.

20.

Which of these is the metadata log?(a) error log(b) ddl log(c) binary log(d) relay logI had been asked this question by my college professor while I was bunking the class.My enquiry is from General MySQL Administration topic in portion MySQL Administration of MySQL

Answer»

Right answer is (b) ddl LOG

The best explanation: The DDL log is also known as the metadata log. The metadata operations PERFORMED by the DDL statements. The RELAY Log has the data CHANGES received from a replication master server WRITTEN in it.

21.

The log in which data changes received from a replication master server are written are ______________(a) error log(b) general query log(c) binary log(d) relay logI got this question by my college director while I was bunking the class.My question is based upon General MySQL Administration topic in section MySQL Administration of MySQL

Answer»

Right answer is (d) relay log

The EXPLANATION is: The Relay Log has the DATA changes received from a replication master SERVER written in it. The problems encountered during the starting, running or stopping of ‘mysqld’ are written in error log.

22.

Multiple MySQL servers cannot be run on the same machine.(a) True(b) FalseThe question was posed to me in exam.The origin of the question is General MySQL Administration in section MySQL Administration of MySQL

Answer»

Correct choice is (a) True

Explanation: It is useful to run multiple SERVERS on the same MACHINE under certain CIRCUMSTANCES. A NEW MySQL release can also be tested while leaving the CURRENT production server in place.

23.

The MySQL server is highly configurable.(a) True(b) FalseI have been asked this question by my school principal while I was bunking the class.This is a very interesting question from General MySQL Administration topic in portion MySQL Administration of MySQL

Answer»

Correct ANSWER is (a) True

Explanation: The MYSQL server is highly configurable. Some of the operational characteristics that you can control include which STORAGE engines the server supports, the DEFAULT character set, and its default time zone.

24.

Without LOCAL, LOAD DATA is _________________(a) less efficient(b) more efficient(c) same speed(d) arbitraryI got this question by my school principal while I was bunking the class.I would like to ask this question from MySQL Components in portion MySQL Administration of MySQL

Answer»

The correct CHOICE is (B) more efficient

The explanation is: LOAD DATA is more efficient without LOCAL. Without LOCAL, the file must be located on the server. The FILE privilege must be given. The server can READ the file DIRECTLY from disk.

25.

The function used to convert a string to an int is ______________(a) INET_ATON()(b) INET_NTOA()(c) INET_ITOS()(d) INET_STOI()I got this question during a job interview.The query is from MySQL Components topic in division MySQL Administration of MySQL

Answer»

The CORRECT choice is (a) INET_ATON()

The best I can explain: In MYSQL, the function USED to CONVERT a string to an INTEGER is INET_ATON(). On the other hand, the function INET_NTOA() converts a string to the corresponding integer value.

26.

The function used to convert an int to string is ______________(a) INET_ATON()(b) INET_NTOA()(c) INET_ITOS()(d) INET_STOI()The question was posed to me in a job interview.My query is from MySQL Components topic in division MySQL Administration of MySQL

Answer»

Correct CHOICE is (B) INET_NTOA()

To elaborate: In MySQL, the function used to convert an integer to a string is INET_NTOA(). On the other hand, the function INET_ATON() CONVERTS a string to the CORRESPONDING integer VALUE.

27.

What is used to perform an analysis of key values by the server?(a) ANALYZE KEYS(b) ANALYZE TABLE(c) PERFORM ANALYSIS(d) PERFORM TABLE ANALYSISThis question was posed to me in an online interview.Query is from MySQL Components in chapter MySQL Administration of MySQL

Answer»

Right option is (b) ANALYZE TABLE

Explanation: In MySQL, for the MYISAM and INNODB tables, the server can be told to PERFORM an analysis of key values by ISSUING the ANALYZE TABLE STATEMENT. It helps in knowing about query optimization.

28.

Which statement is used to check how MySQL would execute a SELECT query?(a) TELL(b) SHOW(c) DISPLAY(d) EXPLAINI had been asked this question in homework.Question is taken from MySQL Components topic in chapter MySQL Administration of MySQL

Answer»

Correct choice is (d) EXPLAIN

The explanation: In MySQL, by issuing an EXPLAIN STATEMENT MySQL displays some INFORMATION about how it would EXECUTE a SELECT query without actually EXECUTING it. It is prefixed with the query.

29.

The tool for copying databases is ______________(a) mysql(b) mysqlcheck(c) mysqlhotcopy(d) mysqlisamchkI got this question in my homework.My question comes from MySQL Components in portion MySQL Administration of MySQL

Answer»

Correct answer is (C) mysqlhotcopy

The BEST explanation: ‘MYSQLDUMP’ and ‘mysqlhotcopy’ are the tools or programs that are used for performing the backing up of the DATABASES and copying databases from ONE server to the other server(s).

30.

The place where the server stores its databases and status files are the data directory.(a) True(b) FalseI got this question by my school principal while I was bunking the class.My doubt stems from MySQL Components topic in portion MySQL Administration of MySQL

Answer»

Right OPTION is (a) True

Explanation: The MySQL data directory is the PLACE where the SERVER stores its DATABASES and status files. It is crucial to understand that all the STRUCTURES and contents of the data directory.

31.

The hub of a MySQL installation is ______________(a) mysqla(b) mysqlb(c) mysqlc(d) mysqldThe question was posed to me in an internship interview.My question is from MySQL Components in section MySQL Administration of MySQL

Answer»

Right choice is (d) mysqld

Explanation: The server, mysqld, is the hub of a MYSQL installation; it performs all MANIPULATION of databases and TABLES. On Unix, several related SCRIPTS are AVAILABLE to assist in server startup.