MySQL Common manual

Source: Internet
Author: User
Tags mysql command line

1. How to log in to MySQL

Under Linux, use the command mysql-u ' your username '-p to enter. Enter your password to log in to MySQL

2. Show what database MySQL has

Use show databses on the MySQL command line; Commands to view

3. How to select a database

After displaying the database through show databases, you can select the database using the command use command. such as use test

4. How to view the table structure

Table structure can be viewed with the DESC command

5. Display the current login user

Through show user (); command to display the current user

6. Displaying the database that is currently in use

Through show database (); command to show which databases are currently in use

7. SQL Mood Classification

DDL: Data definition language, Create,drop,alter

DML: Data Manipulation language UPDATE, Insert,delete,select

DCL: Permission Language GRANT Revoke,commit,rollback

MySQL Common manual

Related Article

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.