MySQL存储引擎与数据库操作原理

查看当前Mysql支持的引擎

 

 创建数据库

create database (if not exists)数据库名;

 

使用数据库

use 数据库名

 

创建表

create table 表名

 

查看所有可以使用的字符集

show character set;

 

 显示所有的字符集及该校对规则

desc information_schema.character_sets;

 

 gbk字符集校对规则

show collation like 'gbk%'

 

 查询当前服务器的字符集

show variables like 'character_set_server';

 

查看校对规则

show variables like 'collation_server';

 

显示当前表字符集和校验规则

show create table 数据库名.表名

 

 修改数据库名称

alter database 数据库名 character set gbk;//修改数据库的字符集为gbk

 

 删除数据库

drop database if exists 数据库名;

 

posted @ 2020-12-06 14:32  简笺  阅读(88)  评论(0编辑  收藏  举报