One of MySQL study notes: bitsCN.com
MySQL has a command line named mysql. enter mysql at the prompt and the following simple prompt will appear:
~ mysqlWelcome to the MySQL monitor. Commands end with ; or /g.Your MySQL connection id is 135Server version: 5.5.35-0ubuntu0.13.10.1 (Ubuntu)Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.mysql>
Mysql command line parameters generally include:
-U user name
-P password
-H host name
-P port number
For example, mysql-u root-p-h localhost-P 3306
The command line prompts you to enter the password
Enter password:
You can also directly enter the password, mysql-p123456 or mysql -- password = 123456
After entering mysql, show databases displays the DATABASE information, use database to enter the DATABASE, and show tables displays the table information.
To display the column information of a table, show columns from table or DESCRIBE table.
Other SHOW usage:
Show status: displays server information
Show grants: displays user permissions
Show errors and show warnings show error or warning information.
BitsCN.com