Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Net::Mysql; my $mysql = Net::MySQL->new( hostname => 'linuxserver', database => 'ADMIN', user => 'user', password => 'password' ); $mysql->query(qq{LOAD DATA LOCAL INFILE 'C:\\1.csv' INTO TABLE `ADMIN` +.`temp` FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n' }); if ($mysql->is_error) { my $DBError = $mysql->get_error_message; print "MySQL Error : $DBError \n"; } $mysql->close;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Load csv file to mysql server
by FalseVinylShrub (Chaplain) on Jul 26, 2009 at 15:21 UTC | |
by Anonymous Monk on Jul 27, 2009 at 12:50 UTC | |
by FalseVinylShrub (Chaplain) on Jul 27, 2009 at 14:45 UTC | |
|
Re: Load csv file to mysql server
by jethro (Monsignor) on Jul 26, 2009 at 15:35 UTC | |
|
Re: Load csv file to mysql server
by bichonfrise74 (Vicar) on Jul 26, 2009 at 15:36 UTC | |
by afoken (Chancellor) on Jul 27, 2009 at 13:12 UTC | |
by Anonymous Monk on Jul 27, 2009 at 16:01 UTC | |
by afoken (Chancellor) on Jul 27, 2009 at 19:18 UTC |