What is the host name in the following MySQL command?
mysql -h cobra.snake.net -p -u sampadam
mysql -h cobra.snake.net -p -u sampadamA. cobra.snake
B. cobra.snake.net
C. sampadam
D. cobra
Answer: Option B
Solution (By Examveda Team)
This question asks you to identify the host name used in a MySQL command. The host name tells MySQL where to connect to the database server.Let's break down the command:
mysql -h cobra.snake.net -p -u sampadam
- mysql: This is the command to start the MySQL client.
- -h cobra.snake.net: This part specifies the host name. cobra.snake.net is the server address where the MySQL database is located.
- -p: This flag prompts for the password.
- -u sampadam: This specifies the username for the database connection.
Therefore, the correct answer is Option B: cobra.snake.net.

Join The Discussion