您的位置:首页 > 博客中心 > 数据库 >

mysql大数据导出导入

时间:2022-03-14 18:40

1)导出

select * from users into outfile ‘/tmp/users.txt‘;
或 select * from users where sex=1 into outfile ‘/tmp/users.txt‘;

 

 

2)导入

load data from infile ‘/tmp/users.txt‘ into table users;

 

 

注意:此方法只能导出导入表数据,表结构需要另外处理。

热门排行

今日推荐

热门手游