Mysql Setup
- The number of attributes in the following table is ______________.
CREATE TABLE Student(
name CHAR(30),
id INT(11)
);
-
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.
- Which of the following options tells mysql to ask for entering the password?
-
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.
- Which script initializes the data directory during installation?
-
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.
- Anonymous accounts have user name ______________.
-
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.
- For REVOKE statements, the server automatically rereads the grant tables.
-
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.