DOS command to enter MySQL
C:/> mysql-H 127.0.0.1-u root-P
Enter Password> ***********
Mysql> complete
Create Database databasename;
Perform operations using the specified database:
Method 1: Use Database databasename;
Method 2: mysql> databsename;
Query the current database name: select database ();
Query all databases: Show databases;
Create Table tablename (table description)
View the data table structure describe tablename;
Query the current database name: select database ();
Query the names of all data tables in the current database: show tables;
Insert database data:
Method 1: insert tablename (recordname1, recordname2) values (data1, data2 );
Method 2: insert tablename values (data1, data2 );
Insert multiple records: insert tablename (columname1, columname2) Vales (data1, data2), (data3, data4 );
Query data table content: Select * From tablename;
Read data from local files and add it to the database
Load data local infile "pathname" into Table tablename;
Method 1: load data local infile "member.txt" into Table tablename;
MySQL databasename <insert_tablename. SQL