MySQL完全、增量的备份与恢复
# mysql -u root -p Enter password:··· //省略部分内容
mysql> use stady; //切换到库
Database changed
mysql> drop table info; //删除info表
Query OK, 0 rows affected (0.02 sec)
mysql> show tables; //查看库中表
Empty set (0.00 sec) //库中为空
mysql> quit //退出数据库,切换到linux
Bye
# mysql -u root -p stady < /opt/stady-info.sql //在linux环境中恢复
Enter password:
# mysql -u root -p //进入数据库查看
Enter password:
··· //省略部分内容
mysql> use stady;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+-----------------+
| Tables_in_stady |
+-----------------+
| info | //info表已恢复
+-----------------+
1 row in set (0.00 sec)
页:
[1]