One of MySQL study notes _ MySQL

Source: Internet
Author: User
Tags mysql command line
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.