Second: the library-related operations

A database system

information_schema: virtual library, do not take up disk space and storage are some of the parameters of the database is started, as the user information table, column information, rights information, character information
performance_schema: MySQL 5.5 beginning a new database: mainly used for the collection database server performance parameters, record a variety of events that occur when processing a query request, lock phenomena 
mysql: authorize, the main storage system user rights information
test database MySQL database system automatically created: test

Two to create the database

Syntax (help create database)

CREATE DATABASE database name of the charset utf8;

2 database naming rules:

May consist of letters, numbers, underscore, @, #, $ 
case sensitive 
uniqueness 
can not be used as create select keywords 
can not be used alone digital 
longest 128

Three database-related actions

Copy the code
1 View database 
Show Databases; 
Show the Create Database db1; 
the SELECT Database ();

 2 Select the database 
USE database name

 3 delete the database 
DROP DATABASE database name;

 4 modify the database 
alter database db1 charset utf8;
Copy the code

 

A database system

information_schema: virtual library, do not take up disk space and storage are some of the parameters of the database is started, as the user information table, column information, rights information, character information
performance_schema: MySQL 5.5 beginning a new database: mainly used for the collection database server performance parameters, record a variety of events that occur when processing a query request, lock phenomena 
mysql: authorize, the main storage system user rights information
test database MySQL database system automatically created: test

Two to create the database

Syntax (help create database)

CREATE DATABASE database name of the charset utf8;

2 database naming rules:

May consist of letters, numbers, underscore, @, #, $ 
case sensitive 
uniqueness 
can not be used as create select keywords 
can not be used alone digital 
longest 128

Three database-related actions

Copy the code
1 View database 
Show Databases; 
Show the Create Database db1; 
the SELECT Database ();

 2 Select the database 
USE database name

 3 delete the database 
DROP DATABASE database name;

 4 modify the database 
alter database db1 charset utf8;
Copy the code

 

Guess you like

Origin www.cnblogs.com/abdm-989/p/11828935.html