Enter the mysql:mysql-hlocalhost-uroot-p;mysql-uroot-p password; View the Help document: Assist view name database (s); Create databases database_name Create databse if not exists database_name; Modify the character set of the databases: ALTER DATABASE database_name DEFAULT CHARACTER set character encoding name; display database: Show D atabases; Displays the details of a database (encoding set): Show CREATE database database_name; Select databases: Use database name; select * form db.table; Delete database: Drop database database_name; stop MySQL server: mysqladmin-uroot-p password shutdown; view MySQL supported data types: show ENGINES; view default storage engine: Show Variables like '%storage_engine% '; Modify the default storage engine My.ini:default-storage-engine=innodb; Note Restarting the MySQL server to restart the MySQL server: Under Services, view the MySQL properties, locate the path, and run the path directly on the command line to start. Data type: 1. Integer types Smallintmediumintint and INTEGERBIGINT2. Floating-point type, bit type: Floatdoubledec and DECIMALBIT3. Date and Time Type: DATEDATETIMETIMESTAMPTIMEYEAR4. String type: Charvarchartinytexttextmediumtextlongtextbinaryvarbinary Creating table: CREATE TABLE table_name (data name data type,..,..); Show CREATE TABLE table_name (\G), used to view table Insert data: INSERT INTO TABLE_NAME values (content); Find data: SELECT * from Table_name;select now (); Current time View error log: My.ini search DataDir Find the MysQL Directory Lookup service for error log files: Settings-Administration Tools-services (can find MySQL service under service, which can be found My.ini) Netstat-an with old view Port enabled .
Basic MySQL operations and data types