Note: all upper command for SQL statement
MySQL commonly used commands
- USE DatabaseName: DatabaseName select database operations
- SHOW DATABASES: View existing database
- SHOW TABLES: View all the current database table
- SHOW COLUMNS FROM Table: see Table Table Properties
- SHOW INDEX FROM Table: Table View Table Index
- CREATE DATABASE DatabaseName: DatabaseName database created
- DROP DATABASE DatabaseName: DatabaseName delete database
- CREATE TABLE TableName(...) ENGINE=InnoDB DEFAULT CHARSET=utf8:创建TableName表
- DROP TABLE TableName: Delete table TableName
- INSERT INTO TableName (...): to insert data into the table TableName
- SELECT * FROM TableName: TableNam query data in the table
The basic parameters of the database connection
- host --- host IP database resides
- username --- MySQL user name
- password --- Username Password
- port --- MySQL server port number