I use the operating system when the Ubuntu16.04, the operation is implemented on the command line:
Start MySQL service: sudo service MySQL start
Log in as root: Mysql-u root-p
Display database: show databases;
Connection database: Use database name;
Creating database: Create database name;
Creating Tables: Create table table name (column name a data type (length), column name B data type (length), column name C data type (length));
Show table: Show tables; (You cannot use this statement to display table name information in a specified database until you connect to the database)
Add data to table: INSERT into table name (column name A, column name B, column name C) VALUES (value 1, value 2, value 3);
View the contents of the table: SELECT * from table name; (See the table for details)
Data type size (bytes) purpose format
int 4 integer
Float 4 single-precision floating-point number
Double 8-precision floating-point number
Enum radio, such as Gender enum (' A ', ' B ', ' C ')
Set multi-select Set (' 1 ', ' 2 ', ' 3 ')
Date 3rd period Yyy-mm-dd
Time 3 point or Duration HH:MM:SS
Year 1 servings value yyyy
CHAR 0~255 Fixed-length string
VARCHAR 0~255 Variable length string
Text 0~65535 Long Text data
Single quotes are generally required for enum, date, time, char, and text data.
MySQL Basic operation