Mysql Setup


  1. The number of attributes in the following table is ______________.
    CREATE TABLE Student(
    name CHAR(30),
    id INT(11)
    );











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The name of the table created is ’Student’. It has two attributes, namely, ’name’ and ’id’. The attributes are the columns in a table. name is of type string and id is of type integer.


  1. Which of the following options tells mysql to ask for entering the password?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    The command ‘mysql -p’ (alternative form: –password) prompts for the password. ‘-h’ (alternative form: –host) specifies the host where the MySQL server is running. ‘-u’ is for specifying the username.



  1. Which script initializes the data directory during installation?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    The data directory is initialized during the installation by ‘mysql_install_db’. If MySQL is installed on Linux from RPM packages then ‘mysql_install_db’ is run automatically.


  1. Anonymous accounts have user name ______________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Anonymous accounts have user name left blank. The main benefit of removing the anonymous user accounts is it significantly simplifies the task of setting up non-anonymous accounts.



  1. For REVOKE statements, the server automatically rereads the grant tables.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    For the ‘REVOKE’ and ‘DROP USER’ statements, the server automatically re-reads the grant tables and no FLUSH PRIVILEGES statements are needed. Hence the grant tables are re-read.