(1)登陆MYSQL数据库客户端;
C:\Users\Administrator>mysql -u root -p
Enter password:
结果:
(2)查看数据库系统中已存在的数据库;
mysql> show databases;
结果:
容易出错打成:show database(正确:databases);会显示ERROR;
(3)查看该数据库支持的存储引擎的类型;
mysql> show engines;
结果:
(4)创建student数据库和teacher数据库;
mysql> create database if not exists student;
mysql> create database if not exists teacher;
结果:
(5)再次查看数据库系统已存在的数据库,确保student和teacher数据库已经存在;
mysql> show databases;
结果:
(6)删除teacher数据库;
mysql> drop database teacher;
结果:
(7)再次查看数据库系统中已经存在的数据库,确保teacher数据库已删除。
mysql> show databases;
结果: