Cyient MySQL Most Frequently Asked Latest Interview Questions Answers

How Do You Add Three Minutes To A Date?

ADDDATE(techpreparation_publication_date, INTERVAL 3 MINUTE)

What's The Difference Between Unix Timestamps And Mysql Timestamps?

Internally Unix timestamps are stored as 32-bit integers, while MySQL timestamps are stored in a similar manner, but represented in readable YYYY-MM-DD HH:MM:SS format.

How Do You Convert Between Unix Timestamps And Mysql Timestamps?

UNIX_TIMESTAMP converts from MySQL timestamp to Unix timestamp, FROM_UNIXTIME converts from Unix timestamp to MySQL timestamp.

What Are Enums Used For In Mysql?

You can limit the possible values that go into the table. CREATE TABLE months (month ENUM ‘January’, ‘February’, ‘March’,…); INSERT months VALUES (’April’);

How Are Enums And Sets Represented Internally?

As unique integers representing the powers of two, due to storage optimizations.

How Do You Start And Stop Mysql On Windows?

net start MySQL, net stop MySQL

How Do You Start Mysql On Linux?

/etc/init.d/mysql start
Cyient MySQL Most Frequently Asked Latest Interview Questions Answers
Cyient MySQL Most Frequently Asked Latest Interview Questions Answers

Explain The Difference Between Mysql And Mysql Interfaces In Php?

mysql is the object-oriented version of mysql library functions.

What's The Default Port For Mysql Server?

3306 is the default port for MYSQL.

What Does Tee Command Do In Mysql?

tee followed by a filename turns on MySQL logging to a specified file. It can be stopped by command note.

Can You Save Your Connection Settings To A Conf File?

Yes, and name it ~/.my.conf. You might want to change the permissions on the file to 600, so that it’s not readable by others.

How Do You Change A Password For An Existing User Via Mysqladmin?

mysqladmin -u root -p password "newpassword"

Use Mysqldump To Create A Copy Of The Database?

mysqldump -h mysqlhost -u username -p mydatabasename > dbdump.sql

Have You Ever Used Mysql Administrator And Mysql Query Browser?

Describe the tasks you accomplished with these tools.

What Are Some Good Ideas Regarding User Security In Mysql?

There is no user without a password. There is no user without a user name. There is no user whose Host column contains % (which here indicates that the user can log in from anywhere in the network or the Internet). There are as few users as possible (in the ideal case only root) who have unrestricted access.

Explain The Difference Between Myisam Static And Myisam Dynamic. ?

In MyISAM static all the fields have fixed width. The Dynamic MyISAM table would include fields such as TEXT, BLOB, etc. to accommodate the data types with various lengths. MyISAM Static would be easier to restore in case of corruption, since even though you might lose some data, you know exactly where to look for the beginning of the next record.

What Does Myisamchk Do?

It compressed the MyISAM tables, which reduces their disk usage.

Explain Advantages Of Innodb Over Myisam?

Row-level locking, transactions, foreign key constraints and crash recovery.

Explain Advantages Of Myisam Over Innodb?

Much more conservative approach to disk space management - each MyISAM table is stored in a separate file, which could be compressed then with myisamchk if needed. With InnoDB the tables are stored in tablespace, and not much further optimization is possible. All data except for TEXT and BLOB can occupy 8,000 bytes at most. No full text indexing is available for InnoDB. TRhe COUNT(*)s execute slower than in MyISAM due to tablespace complexity.

What Are Heap Tables In Mysql?

HEAP tables are in-memory. They are usually used for high-speed temporary storage. No TEXT or
BLOB fields are allowed within HEAP tables. You can only use the comparison operators = and <=>. HEAP tables do not support AUTO_INCREMENT. Indexes must be NOT NULL.

How Do You Control The Max Size Of A Heap Table?

MySQL config variable max_heap_table_size.

What Are Csv Tables?

Those are the special tables, data for which is saved into comma-separated values files. They cannot be indexed.

Explain Federated Tables?

Introduced in MySQL 5.0, federated tables allow access to the tables located on other databases on other servers.

Post a Comment

Previous Post Next Post