> For the complete documentation index, see [llms.txt](https://xn--6o0a585a.gitbook.io/devops/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xn--6o0a585a.gitbook.io/devops/shu-ju-ku/kuai-su-dao-chu-dao-ru-da-shu-ju.md).

# 快速导出导入大数据

一、导出数据

1、mysqldump

2、重命名压缩

3、scp传输

```
scp msn.sql.zip root@172.105.xx.xx:/root/
```

二、导入数据

1、解压

```
unzip msn.sql.zip
```

2、连接数据库

```
mysql -umsn_block -p password
mysql -umsn_mall -p  password
```

3、设置参数

```
#设置参数
set autocommit=0;
use msn_block;
START TRANSACTION;
#导入数据库
source /root/msn.sql;
#提交事务
COMMIT;
```
