MySQL Database common operations

Source: Internet
Author: User
  1. Database connection and shutdown: Mysql-h Server host address-u user name-P user Password

  2. Create a new user and authorize: Grant permissions on the database. Data table to username @ Login host identified by "password"
  3. Creating database: Create databases [if not exists] database name;

  4. Delete database: Drop database [if exists] name;

  5. Display database: show databases;

  6. Open database is currently used: use database name;

  7. To create a data table:

  8. See how many tables the current database has: show tables;

  9. View data table structure: DESC table name;

  10. Delete data table: drop table name;

  11. Inserting row Records into a datasheet (insert)

  12. Querying data records from a data table (SELECT)

  13. Change the records that exist in the data table (UPDATE)

  14. Delete a record in a data table (delete)

    

MySQL Database common operations

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.