显示数据库列表
show databases;
显示库中的数据表
use mysql; // 打开库
show tables;
建库
create database 库名;
建库是设置好字符编码:
create database 库名 character set utf-8;
GBK: create database test2 DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci;
UTF8: CREATE DATABASE `test2` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
删库
drop database 库名;