[root@serv01 databackup]# ll larrydb
total 36
-rw-rw----. 1 mysql mysql 8590 Sep 10 19:07 class.frm
-rw-rw----. 1 mysql mysql 65 Sep 10 19:07 db.opt
-rw-rw----. 1 mysql mysql 8618 Sep 10 19:07 stu.frm
-rw-rw----. 1 mysql mysql 48 Sep 10 19:07 stu.MYD
-rw-rw----. 1 mysql mysql 1024 Sep 10 19:07 stu.MYI
mysql> use larrydb;
Database changed
mysql> show tables;
+-------------------+
| Tables_in_larrydb |
+-------------------+
| class |
| stu |
+-------------------+
2 rows in set (0.00 sec)
mysql> show create table class \G;
*************************** 1. row ***************************
Table: class
Create Table: CREATE TABLE `class` (
`cid` int(11) DEFAULT NULL,
`cname` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
ERROR:
No query specified
mysql> show create table stu \G;
*************************** 1. row ***************************
Table: stu
Create Table: CREATE TABLE `stu` (
`sid` int(11) DEFAULT NULL,
`sname` varchar(30) DEFAULT NULL,
`cid` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
ERROR:
mysql> drop table class,stu;
Query OK, 0 rows affected (0.01 sec)
mysql> show tables;
Empty set (0.00 sec)
#这样删除会出错,不要这样删除
[root@serv01 databackup]# rm -rf /usr/local/mysql/data/larrydb/*
[root@serv01 databackup]# rm -rf /usr/local/mysql/data/larrydb/