时间:2021-07-01 10:21:17 帮助过:2人阅读
mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | -- mysql元数据,基础数据 | mysql | --mysql配置数据库,其中包含用户信息。(用户名和密码,权限管理) | performance_schema | --mysql数据库软件的运行数据,日志信息,性能数据 | test | --测试数据库。空的 +--------------------+ 4 rows in set (0.00 sec) |
mysql> create database day15 -- 指定默认字符集创建数据库 -> default character set utf8 -> ; Query OK, 1 row affected (0.00 sec) |
mysql> show create database day15; +----------+----------------------------------------------------------------+ | Database | Create Database | +----------+----------------------------------------------------------------+ | day15 | CREATE DATABASE `day15` /*!40100 DEFAULT CHARACTER SET utf8 */ | +----------+----------------------------------------------------------------+ 1 row in set (0.00 sec) |
mysql> drop database day15; Query OK, 0 rows affected (0.01 sec) |
mysql> alter database day15 default character set gbk; Query OK, 1 row affected (0.00 sec) |
数据库 基础篇3(mysql语法)
标签: