---
title: "mysql 数据导出导入"
author: "java.zhangshuling"
date: "2022-05-11T15:42:30Z"
tags: []
categories: ["数据库"]
slug: "mysql"
draft: false
lastmod: "2022-05-11T15:42:30Z"
id: 2531762
url: "https://java-zhangshuling.iteye.com/blog/2531762"
---

```java


select * from t_user into outfile "D:/user"  fields terminated by ',' optionally enclosed by '"' lines terminated by '\n';


```



```java


load data infile 'D:/user' replace into table tmp_user fields terminated by ',' optionally enclosed by '"' lines terminated by '\n' ;


```