One
1. configuration file
2. Data Storage location
3. Log Location
Two-SQL
1. Login mysql-h IP Build list, delete the list.
2. Check version, simple operation
1 Increase
1.1"Insert a single line"
Insert [into] <Table name> (Column Name) VALUES (column Values)
Example:Insertinto strdents (name,Sex,Date of birth) VALUES ('Happy Friends', 'male' , ' 1980/6/15 ')
1.2"Add existing table data to a table that already exists"
INSERT INTO <Existing new tables> (Column Name) Select <original table column name>from <Original table name>
Example:insertinto Tongxunlu ('name', 'Address', 'Email')
Select Name,address,emailfrom strdents
1.3 "Create a new table directly with the existing table data and populate"
Select < >into < new table name >from < source table name >
selectname,address,email to Tongxunlu from strdents
1.4the UseUnionkeyword merge data to insert multiple lines "
Insert <Table name><Column Name>select <column Values>tnion Select <column Values>
Example:insertstudents (name,Sex,Date of birth)
Select 'Happy Friends', 'male' , ' 1980/6/15 ' union(Unionrepresents the next line)
Select 'Blue Xiaoming', 'male' , ' 19**/**/** '
2 Delete
2.1the Delete<meet the conditions of>Line "
Delete from <Table name>[where <Delete Condition;]
Example:Deletefrom A where name= 'Happy Friends'(Delete tableaThe values in the column are the rows of happy Friends)
2.2 "Delete entire table"
TRUNCATE TABLE < name >
TRUNCATE TABLE Tongxunlu
Note: Delete all rows of the table, but the structure, columns, constraints, indexes, etc. of the table are not deleted;
3 Change
Update <Table name>set <Column Name=Update Values>[where <Update Condition;]
Example:Updatetongxunlu SetAge=18wherename= 'Blue Nickname'
Rename the table, delete a column, modify the column data type, and rename a column.
MySQL Foundation one