MySQL Super Concise basic Operation Raiders, to see for themselves (a)

Source: Internet
Author: User

System: Ubuntu 14.04 LTS

Installation:

Apt-get Install mysql//Installation database Apt-get install mysql-workbench//installation graphical interface
Use:

On startup: mysql-h [Address]-P [port]-u[user name]-p[password]

This will be the case when you enter:

MySQL > is the place to enter commands, exit can be used with exit

In MySQL, commands are generally required to add semicolons.

Database operations:

Create database name;   Create show databases;   View drop databases;  Delete the use database name;     Using the current database

Operation of the table:

Show tables; View table create table (column name data type  extra parameter,...);
Common Additional parameters:

Null/not NULL

Default Defaults

Auto_increment Self-increment

Unique only

Parmiry Key Primary Key

Foreign keys (this is not the same as SQL Server)

CONSTRAINT FOREIGN Key (key name) REFERENCES (key name)

Character set (not set with possible garbled characters)

charset=utf-8/.....


The operation of the table itself is the same as the standard SQL language.


MySQL Super Concise basic Operation Raiders, to see for themselves (a)

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.