指引网

当前位置: 主页 > 数据库 > MySQL >

mysql会员数据导入导出

来源:网络 作者:佚名 点击: 时间:2017-10-15 10:12
[摘要] 系统迁移或者更换的时候用到的,特别注意里面的引号,很容易弄错了。旧会员导出select #39;uid#39;,#39;username#39;,#39;password#39;,#39;email#39;,#39;salt#39; union select#39;uid#39;,#3...

系统迁移或者更换的时候用到的,特别注意里面的引号,很容易弄错了。

 

旧会员导出

 

select 'uid','username','password','email','salt' union select 

'uid','username','password','email','salt' from 'uc_members' into 

outfile '/score.sql'

 

导入

 

load data infile '/score.sql'

into table `chbwzstb_users`

character set utf8

fields terminated by '\t'

lines terminated by '\n'

ignore 1 lines

(`uid`, `username`, `password`, `email`, `salt`);

 

------分隔线----------------------------