To sign into your mySQL server on the command line, you will first enter the text mysql. Next, you will enter -u followed by your MySQL username. Then you will enter -p followed by your MySQL password. Lastly, type a semicolon and press Enter.
[root@server1 ~]# mysql -u username -p password; Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 40 Server version: 5.5.41-0ubuntu0.14.04.1 (Ubuntu) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement