1.1对数据库thunder进行备份mysqldump -S /tmp/mysql3316.sock --single-transaction --master-data=2 thunder >thunder_full_2015112.sql
1.2进行truncate table操作并insert into table(work)root@localhost:mysql3316.sock [(none)]>select * from thunder.tb1;
+----+---------+
| id | name |
+----+---------+
| 1 | test |
| 4 | thun |
| 5 | thunder |
| 6 | thun |
| 7 | thun |
| 8 | thun |
| 9 | test |
+----+---------+
7 rows in set (0.00 sec)
(work)root@localhost:mysql3316.sock [(none)]>truncate table thunder.tb1;
Query OK, 0 rows affected (0.02 sec)
(work)root@localhost:mysql3316.sock [(none)]>insert into thunder.tb1(name) values('like');
Query OK, 1 row affected (0.00 sec)
(work)root@localhost:mysql3316.sock [(none)]