To connect to a MySQL DB system using MySQL Shell, you can use several command-line formats. Here, we will analyze the provided options:
A:mysqlsh -h 10.0.1.221 -u admin -p MySQL8.0
* Incorrect format. The password should not be directly placed after the-pflag without a space or equals sign.
B:mysqlsh mysql://MySQL8.0:
[email protected]* Incorrect format. The username should come before the password in the URL.
C:mysqlsh mysql://admin:
[email protected]* Correct format. This is a valid way to connect using a URL-like format whereadminis the username,MySQL8.0is the password, and10.0.1.221is the host.
D:mysqlsh -h10.0.1.221 -uadmin -pMySQL8.0
* Correct format. This is a valid way to connect using flags, with no spaces between the flags and their values.
E:mysqlsh -host 10.0.1.221 -user admin -password MySQL8.0
* Incorrect format. MySQL Shell uses-h,-u, and-pfor specifying host, username, and password respectively.