In order to straight login to the remote MySQL console, use the following command:
mysql -u {username} -p'{password}' \
-h {remote server ip or name} -P {port} \
-D {DB name}
For example
mysql -u root -p'root' \
-h 127.0.0.1 -P 3306 \
-D local
There should not be any space after -p as stipulated in the documentation.
Then this would take you to the MySQL console quickly by changing to the specified database.
If you want to learn more about SQL, Check out this SQL Certification by Intellipaat.
Do check out the video below