[TriLUG] mySQL Data Import

Greg Cox glcox at pobox.com
Wed May 11 18:13:48 EDT 2005


> I have been known to take a dumped file and edit it in 'vi', turning
> each line into an SQL 'insert' command.

If we're down to Cadillacs as flyswatters, you may as well install a
local (not brain-dead) copy of mysqld, wrapper up your mysqlimport/
mysqldump recipe to where you can just do
  `./massage.sh infile.csv outfile.sql`
and get a useful sql file.

Then get that off into the real DB.

If you're fancy and netsol hasn't totally boned you on access, you ought
to be able to apply it remotely (if you can access the DB remotely) or
bundle some (rsync|scp)+ssh to apply it remotely after the local transform.




More information about the TriLUG mailing list