mysqlimport 失败
mysqlimport -prl -fields-enclosed-by=" -fields-terminated-by=, test OLEDBDestination.txt
执行后
> ---------------- linux 下 不知道什么意思 ? OLEDBDestination这个表是存在 test的
格式是对的
执行后
> ---------------- linux 下 不知道什么意思 ? OLEDBDestination这个表是存在 test的
格式是对的
作者: liyihongcug 发布时间: 2011-05-25
mysqlimport -hlocalhost -uroot -p556 test /home/aa/OLEDBDestination.txt --fields-terminated-by=',' --fields-enclosed-by='"' --ignore-lines=3
ysqlimport: Error: Can't get stat of '/home/aa/OLEDBDestination.txt' (Errcode: 13), when using table: OLEDBDestination
错误原因
mysqlimport: Error: Can't get stat of '/root/bill.sql'
mysqlimport -uroot --fields-terminated-by=, --lines-terminated-by='\n' myqd /root/bill.sql
mysqlimport: Error: Can't get stat of '/root/bill.sql' (Errcode: 13), when using table: bill
权限问题。将bill.sql移到mysql目录下即可。因为mysql帐号无法读取/root目录,简单更改bill用户属性、读写权限也没有用。
http://mycbc.cn/cmmb/bbs/redirect.php?tid=5839&goto=lastpost
最后 就成功了
ysqlimport: Error: Can't get stat of '/home/aa/OLEDBDestination.txt' (Errcode: 13), when using table: OLEDBDestination
错误原因
mysqlimport: Error: Can't get stat of '/root/bill.sql'
mysqlimport -uroot --fields-terminated-by=, --lines-terminated-by='\n' myqd /root/bill.sql
mysqlimport: Error: Can't get stat of '/root/bill.sql' (Errcode: 13), when using table: bill
权限问题。将bill.sql移到mysql目录下即可。因为mysql帐号无法读取/root目录,简单更改bill用户属性、读写权限也没有用。
http://mycbc.cn/cmmb/bbs/redirect.php?tid=5839&goto=lastpost
最后 就成功了
作者: liyihongcug 发布时间: 2011-05-26
第2种方法 在 mysql内部执行 (跟 oracle 一样)
mysql > load data infile /..../emp.txt into table emp fields terminated by ',' enclosed by '"'
可以网上很多版本估计太老转载得有问题
sed -i '1d' OLEDBDestination.txt 这里 是去掉第1行 因为该文件实在过大 ,无法打开 。
mysql > load data infile /..../emp.txt into table emp fields terminated by ',' enclosed by '"'
可以网上很多版本估计太老转载得有问题
sed -i '1d' OLEDBDestination.txt 这里 是去掉第1行 因为该文件实在过大 ,无法打开 。
作者: liyihongcug 发布时间: 2011-05-26