Mysql Setup


  1. What is ‘tamp’ in the following command?
    mysql -h xyz.host.try.net -p -u tamp











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    ‘tamp’ is the name of the user. The user will be prompted for password due to the ‘-p’ option. ‘xyz.host.try’ is the host name here. The entire command specifies the host-user pair and prompts for password to establish the connection.


  1. What is the host name in the following command?
    mysql -h interview.mania.com -p -u sampadam











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    The ‘-h’ option specifies the hostname of the server. The ‘interview.mania.com’ is the complete host name. The ‘-p’ option prompts for the account’s password and ‘-u’ specifies the user name.



  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. 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. MySQL client runs on the machine containing the databases and servers connect to the client over a network.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    MySQL operates using a client/server architecture. It is the server that runs on the machine and not the client. The clients connect to the MySQL server to request information from the database(s).