With windows, you can use "type filename.sql | mysql ..."
> Maybe he's running in some windows version??
> It seems to me that your example using std-in is the easiest. I would
> suggest also writing a perl program but in this case I thing your
> example is
> right on. Then again if he's using
al Message-
From: DEVOS BASTIEN [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 7:39 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Run Mysql command from a file.
I'll maybe say something stupid, but if you have your files with your SQL
commands, couldn't you use this
Hello,
On Tue, 15 May 2001, Aires Lima Trindade wrote:
> How to run SQL commands from a text file" but they wasn't clear for me.
> Does anybody can share with me old experience or a real example
> about this case?
C:\mysql\bin>copy con upd.sql
USE akw;
INSERT INTO tmp (id,c1) VALUES(NUL
I'll maybe say something stupid, but if you have your files with your SQL
commands, couldn't you use this command ? :
mysql -u your_user -pyour_password < /path/to/your/SQL/commands/file
?
> -Original Message-
> From: Aires Lima Trindade [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, May 15,
It really depends on what you want to do. If all you are doing is issuing
delete and insert statements with no decision logic then prepare you
statements, place them in your file and then form the command line (or cron
job)
mysql -u username -p password < mysqlcomands.file
assuming that the cron