你的位置:首页 > 数据库

[数据库]mysql会员数据导入导出


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

旧会员导出

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 utf8fields terminated by '\t'lines terminated by '\n'ignore 1 lines(`uid`, `username`, `password`, `email`, `salt`);