required fields in//{} | The same as in PHP [] optional
< viewing error alerts >
SHOW WARNINGS;
</viewing error alerts >
< log in to the database and exit >
MySQL [-H site] {-u user name} {-p password} [-P port]
exit;
</Login database and exit >
< parameters when creating a database >
CREATE {DATABASE | SCHEMA} [IF not EXISTS] db_name [DEFAULT] CHARACTER SET [=] charset_name;
CREATE DATABASE Example;//create database if not EXISTS example;//create batabase if not EXIST example DEFAULT CHAR Acter SET ' UTF-8 ';
</Parameters > When creating a Database
< view databases >
show databases;
</View Database >
< View database encoding methods >
Show Create Database dbname;
</View Database encoding method >
< Modify database encoding >
ALERT {DATABASE | SCHEMA} [Db_name] [DEFAULT] CHARACTER SET [=] chatset_name;
Alert Database dbname Character set = ' code ';//alert database dbname Character set ' code ';
</modifying database encoding >
< Delete a database >
Drop{database | SCHEMA} [IF EXISTS] db_name;
DROP Database IF EXISTS example;
</Deleting a database >
< working with databases >
USER DATABASE;
</using Databases >
< data types >
Data type refers to the column, stored process parameters, expressions and local variables of the data characteristics, determines the data storage format, representing different information types
< integral type >
</Integral type >
< floating-point >
</floating-point >
< date and Time type >
</date and Time type >
< character type >
</Character type >
</Data Type >
Re-learning MySQL data type (i)