MYSQL大数据导入
感谢XP提供的代码!
在这里记录一下,因为以后学要用;作用资料查询之用!
第一步:mysql -h localhost -uroot
第二步:show databases;
第三步:use changchunmap;
第四步:show tables;
第五步:load data local infile "d:/c.txt" replace into table changchunmap fields terminated by ' ';
没有了;
load data local infile "d:/migration/mysql/babel_topic.txt" replace into table babel_topic_test fields terminated by ' '
load data local infile "d:/migration/mysql/babel_user.txt" replace into table babel_user_test fields terminated by '\t'
在导入过程中因为某些字段数据为NULL修改了某些表格的长度和可以为空,为了正确导入,请保证如下字段修改完毕:
Babel_topic: tpc_uname VARCHAR(192) 可以为NULL
Babel_user: usr_password VARCHAR(64) 可以为NULL
usr_nick VARCHAR(192) 可以为NULL
load data local infile "d:/c.txt" replace into table changchunmap fields terminated by ' '
相关文章
mysql将数据库中所有表结构和数据导入到另一个库的方法(亲测有效)
这篇文章主要给大家介绍了关于mysql将数据库中所有表结构和数据导入到另一个库的方法,文中通过代码介绍的非常详细,亲测有效,对同样遇到这个需求的朋友具有一定的参考借鉴价值,需要的朋友可以参考下2024-01-01


最新评论