Rainrays Profiles
   Login | Registration | What you Want | Free Ads | Tours & Travel India

Home rainrays profile world Aadhaar Card Online Free Marketing Contact Us Online Free Marketing URL Submission Online Free Marketing Tour n Travel Free Ads with rainrays Products Web Directory Pincode India Web Directory Search India Jobs Herbalife Club Online Fm radio Recipes

Custom Search
Plan Your Tour
Best Tours India
 Week End Tours  Week End Tours
 Wildlife tours Wildlife tours
 Honeymoon  Honeymoon Tours
 Religious Tours Religious Tours
 Religious Tours International Tours
 Religious Tours Indian Tours for Overseas

South India Tour

More Topics...
  Hospitals & clinics in India Hospitals & clinics in India
  Hospitals & clinics in India World Travel Tips
 Kitchen Dictionary Kitchen Dictionary
 Recipes Recipes
 Personality Personality
 Institute/Colleges Institute/Colleges
 Indian Festivals Indian Festivals
 University University
 Restaurant Restaurant
 Districts List in India Districts List in India
 Districts Profile of India Districts Profile of India
 Hotels Hotels
 Love dating and Romance Love dating and Romance
 Baby name list Baby name list
 Jobs by location Jobs by location
 Jobs by Keyword Jobs by Keyword
 Jobs by Function Jobs by Function
 Jobs Part Time Jobs Part Time
 Shayari Shayari
 Place Profile Place Profile
 Business Profiles Business Profiles
 Professional Profiles Professional Profiles
 Rainrays Member Rainrays Member

MySQL Interview Question list

  Topic » Language » PHP » PHP Interview Question
Post By : Pankaj Raghuwanshi At 2010-12-16


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

  2. 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.
  3. What does myisamchk do?
     - It compressed the MyISAM tables, which reduces their disk usage.

  4. Explain advantages of InnoDB over MyISAM? - Row-level locking, transactions, foreign key constraints and crash recovery.

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

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

  7. How do you control the max size of a HEAP table?
     - MySQL config variable max_heap_table_size.

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

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

  10. What is SERIAL data type in MySQL?

  11. What happens when the column is set to AUTO INCREMENT and you reach the maximum value for that table? 
    - It stops incrementing. It does not overflow to 0 to prevent data losses, but further inserts are going to produce an error, since the key has been used already.
  12. Explain the difference between BOOL, TINYINT and BIT.
    - Prior to MySQL 5.0.3: those are all synonyms. After MySQL 5.0.3: BIT data type can store 8 bytes of data and should be used for binary data.

  13. How do you start MySQL on Linux?
     - /etc/init.d/mysql start

  14. Explain the difference between mysql and mysqli interfaces in PHP? 
    - mysqli is the object-oriented version of mysql library functions.

  15. What’s the default port for MySQL Server?
     - 3306

  16. 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 notee.
  18. What happens if a table has one column defined as TIMESTAMP?
     - That field gets the current timestamp whenever the row gets altered.

  19. But what if you really want to store the timestamp data, such as the publication date of the article? 
    - Create two columns of type TIMESTAMP and use the second one for your real data.
  1. 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.

  2. How do you change a password for an existing user via mysqladmin? 
    - mysqladmin -u root -p password "newpassword"

  3. Explain the difference between FLOAT, DOUBLE and REAL.
    - FLOATs store floating point numbers with 8 place accuracy and take up 4 bytes. DOUBLEs store floating point numbers with 16 place accuracy and take up 8 bytes. REAL is a synonym of FLOAT for now.

  4. If you specify the data type as DECIMAL (5,2), what’s the range of values that can go in this table? 
    - 999.99 to -99.99. Note that with the negative number the minus sign is considered one of the digits.
  1. Use mysqldump to create a copy of the database?
     - mysqldump -h mysqlhost -u username -p mydatabasename > dbdump.sql

     - The column exhibits the same behavior as a single timestamp column in a table with no other timestamp columns.

  3. What does TIMESTAMP ON UPDATE CURRENT_TIMESTAMP data type do? -
    On initialization places a zero in that column, on future updates puts the current value of the timestamp in.

    - A default value is used on initialization, a current timestamp is inserted on update of the row.

  5. If I created a column with data type VARCHAR(3), what would I expect to see in MySQL table? - CHAR(3), since MySQL automatically adjusted the data type.

Refer to Friend

  Rainryas information World

Share Info/View About Profile Or Any Comment

Your Name:* 
Other Topic
List of Hoaspitals and Clinics in Imphal
Pincode Namakkal District Tamilnadu
Village in Rudhauli Tehsil
WC-2011:India vs West Indies Cricket Score card in WC 2011
Village in Chakia Tehsil
Create Your Profile in Category » PHP Interview Question
More on rainrays.com
Top Links : FM Radio | Contact us | About us | Privacy & Policy | Terms & Condition | Extract Email | Submit URL to Search Engine
Net Search : For Cooking | Word Dictionary | Encyclopedia Search | Find Location by MAP | Find a Person | Find Your Shipping | Stock Market | Language Converter
Jobs : Jobs by Location | Part Time Jobs | Jobs by Function | Jobs by Keyword | Jobs Out of india | Jobs Search Engine
Other Links
    Girl baby Names | Boy baby Names | Love dating and Romance | University | Restaurants in India | Hotels in India | Hospitals & clinic
    Coaching Institute | Educational Institution | School/Colleges by Loaction | Recipes | Std Code | PHP | Products | Links
PHP Interview Question

Copyright © 2010 --- All Rights Reserved