MySQL带二进制的库表导出导入
原创【mysqldump】导出sql脚本,无法使用select导出某些字段
导出
mysqldump -hlocalhost -P3307 -uroot -p123456 mydb mytable --where="id = 412123456" --hex-blob --add-drop-table=false --add-locks=false --no-create-info=true>"d:\export.sql"
导入
mysql -hlocalhost -P3307 -uroot -p123456 mydb <export.sql
或者先mysql登录、切换DB,执行source export.sql
【sql】导出数据使用select语句
select id, c1, c2, c3, c4, c5, c6, c7, c8 from mydb.mytable limit 100 into outfile
C:/ProgramData/MySQL/MySQL Server 5.7/Uploads/out.csv fields Terminated by, lines terminated by\r\n;
导入
load data infile C:/ProgramData/MySQL/MySQL Server 5.7/Uploads/out.csv into table mydb.mytable
【mysql】导出数据使用select
mysql -h192.168.1.12 -P3307 -uroot -p123456 test -e "select id,name,age from usertable" > d:\users.csv
版权声明
所有资源都来源于爬虫采集,如有侵权请联系我们,我们将立即删除