Sign into MySQL using the Linux Terminal

Home > Search
  by

To sign into your MySQL server using the Linux Terminal, 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 -uusername -ppassword;

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

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments