Database Operations and database operation statements
Database Operations create a database
Syntax:
Create database name [charset utf8 ];
Example:
The essence of database creation: a directory with the same name as the database will be created in the directory specified by datadir configuration options in my. ini.
There will be a db. opt text file example in the database directory with the same name:
Note:
Character Set, which is the encoding method used to store Databases
A verification set is a comparison rule in a character set.
Example of datadir in my. ini:
View Database
View All databases
Syntax:
Show databaseS;
Example:
Database test, which can be deleted
Mysql database, mysql core database, and msyql are used to manage databases of other databases.
We recommend that you do not modify the data in it easily.
The information_schema database records information about mysql used to manage other databases.
Performance_schema database, a performance database, mainly records the running information of the server.
View database creation statements
Syntax;
Name of the show create database;
Example:
Modify Database
Only character sets and verification sets can be modified.
Alter database name charset Character Set;
Example:
Delete Database
Syntax:
Drop database name;
Example:
Example: