List:General Discussion« Previous MessageNext Message »
From:Christopher R. Jones Date:August 2 2000 4:56pm
Subject:Re: HELP: Automating mysqlimport
View as plain text  
I use a cron job to import data nightly but I use LOAD DATA LOCAL INFILE.
I have a shell script that is "croned".  It is something like:
mysql -h thehost -u me -pmypass mydatabase < load1.sql

Thats it.

load1.sql contains the load data lines:
LOAD DATA LOCAL INFILE 'table1.dat' INTO TABLE table1;
LOAD DATA LOCAL INFILE 'table2.dat' INTO TABLE table2;
LOAD DATA LOCAL INFILE 'table3.dat' INTO TABLE table3;
etc.



>Hello everyone. I've been working on a little project for a few days now,
>and have run into a wall that I just can't seem to get past. Hopefully,
>someone can help me out. 
>
>I have a cron job which FTP's some raw data to me on a nightly basis. I want
>to setup another cron job which will automatically import that data into a
>mysql table. Now the script I have written appears to work, but the problem
>I run into is that mysqlimport inevitably prompts me for a password before
>importing the data. Does anyone know of a way to feed the password to
>mysqlimport? Something like a .netrc file, perhaps? I would hate to create a
>new user with no password to import the data - that hardly seems secure at
>all... Any help would be greatly appreciated.
>
>
>Jason Charette
>Email jason.charette@stripped
>
>
>
>-- 
>---------------------------------------------------------------------
>Please check "http://www.mysql.com/php/manual.php" before
>posting. To request this thread, e-mail mysql-thread46414@stripped
>
>To unsubscribe, send a message to:
>     <mysql-unsubscribe-cj=interlog.com@stripped>
>
>If you have a broken mail client that cannot send a message to the above
> address(Microsoft Outlook), you can use http://lists.mysql.com/php/unsubscribe.php


Christopher R. Jones, P.Eng.
14 Oneida Avenue
Toronto, Ontario M5J 2E3
Tel. 416 203-7465
Fax. 416 203-3044
Email cj@stripped


Thread
HELP: Automating mysqlimportJason Charette2 Aug
  • Re: HELP: Automating mysqlimportChristopher R. Jones2 Aug
  • Re: HELP: Automating mysqlimportGerald Clark2 Aug
  • Re: HELP: Automating mysqlimportJohn Firebaugh2 Aug