Usually we will use the MySQL client program to connect to the MySQL library, this is usually working in interactive mode, such as we connect to MySQL and do the following:
mysql-uroot-h127.0.0.1-P3306welcome to the MySQL Monitor. Commands End With; or \g.your MySQL connectionIDIs theServer Version:5.7. --enterprise-commercial-advanced-log MySQL Enterprise Server-Advanced Edition (commercial) Copyright (c) -, ., Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or Itsaffiliates. Other names trademarks of their respectiveowners. Type'Help ;'Or'\h' forHelp. Type'\c'ToClearThe current input statement.mysql>
This time we can use SQL statements to complete the interaction with the database, such as:
Usetempdb;DatabaseChangedmysql> descPerson ;+-------+------------+------+-----+---------+----------------+|Field|Type| Null | Key | Default |Extra|+-------+------------+------+-----+---------+----------------+|Id| int( One)|NO|Pri| NULL |Auto_increment||Name| varchar(8)|YES|UNI| NULL | |+-------+------------+------+-----+---------+----------------+2Rowsinch Set(0.01sec) MySQL> Select * fromPerson ;+----+------+|Id|Name|+----+------+| 1 |A|| 2 |B|| 3 |C|+----+------+3Rowsinch Set(0.00sec) MySQL>
That's all we've got to do to get the protagonist out of today, this is MySQL batch mode
------
MySQL MySQL client work batch processing some usage