1.导出sql文件 mysqldump --column-statistics=0 -uusername -ppassword -hyour server ip --default-character-set=gbk your DB your table >F:\mysqldump\crawler_qichacha.sql 2.导入到数据库 source F:\mysqldump\crawler_qichacha.sql
1. 设置maxpacket. 要在[mysqld]标签下.这个疏忽了,就会发现没效果. 基本网上的都没说清,要看stackoverflow. Change in the my.ini file. Include the single line under [mysqld] in your file max_allowed_packet=500M 2. 在命令行,登陆mysql,制定encoding mysql -uroot -P3308 -p123456 - -default-charact
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; 注意:此方法只能导出导入表数据,表结构需要另外处理.
linux: load data infile '/tmp/dnslog.txt' into table dnslog_cnnic_cn fields terminated by ' ' lines terminated by '\n'; windows: load data local infile 'd:\dnslog_daily_nodes_total.sql' into table dnslog_cnnic_cn_nodes_total fields terminated by ' '
运行 输入CMD 进入 命令行窗口 输入Mysql.exe的路径 如:c:/wamp/bin/mysql.exe 回车 这时出现 welcome to the mysql ...的提示 进入成功 然后就可以使用Mysql 的各种命令了 mysql source命令 今天碰到个问题要用phpmyadmin导入1G的数据,但是在怎么都导入不了,用命令行就可以轻松搞定了.用mysql source命令可以导入比较大的文件. mysql>use dbtest;mysql>set names u