Mysql and mysql

Source: Internet
Author: User

Mysql and mysql

1. How to log on to mysql

Run mysql-u 'your username'-p in linux and press Enter. Enter the password to log on to mysql.

 

2. Display mysql Databases

Run the show databses command in the mysql command line.

 

3. How to Select a database

After the show databases command is used to display the database, you can use the use command to select the database. For example, use test

 

4. view the table structure

Run the desc command to view the table structure.

 

5. display the current Login User

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

 

6. display the currently used database

Use the show database () command to display the database currently in use

 

7. SQL tone Classification

DDL: Data Definition Language, CREATE, DROP, ALTER

DML: data operation language UPDATE, INSERT, DELETE, SELECT

DCL: Permission Language grant revoke, COMMIT, ROLLBACK

 

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.