[PHP] Batch job in UNIX.

2001-07-05 Thread Johan Vikerskog (ECS)

If i want to add something into a table with just the mysql command.
Is this possible.

Like
./mysql -p -u root test insert into...

Something like this.Is that possible and how in that case.

Johan Vikerskog
Technician - CAE Tools Support
Research  Technology Development
'''
Ericsson Mobile Communications AB
Mobile Phones  Terminals   Telephone: +46 46 19 33 38
Nya VattentornetTelefax:+46 46 19 32 36 
SE-221 83 Lund, Sweden  


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Batch job in UNIX.

2001-07-05 Thread Alexander Wagner

Johan Vikerskog (ECS) wrote:
 If i want to add something into a table with just the mysql command.
 Is this possible.

 Like
 ./mysql -p -u root test insert into...

 Something like this.Is that possible and how in that case.

echo insert into... | ./mysql -p -u root test
or
cat filename | ...

regards
Wagner

-- 
Isn't it strange? The same people who laugh at gypsy fortune tellers take 
economists seriously.
 - Cincinnati Enquirer   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Batch job in UNIX.

2001-07-05 Thread Johan Vikerskog (ECS)

But i want dont want to type in the password. I want to have the password in the 
command file.

//Johan

-Original Message-
From: Alexander Wagner [mailto:[EMAIL PROTECTED]]
Sent: den 5 juli 2001 12:57
To: Johan Vikerskog (ECS); [EMAIL PROTECTED]
Subject: Re: [PHP] Batch job in UNIX.


Johan Vikerskog (ECS) wrote:
 If i want to add something into a table with just the mysql command.
 Is this possible.

 Like
 ./mysql -p -u root test insert into...

 Something like this.Is that possible and how in that case.

echo insert into... | ./mysql -p -u root test
or
cat filename | ...

regards
Wagner

-- 
Isn't it strange? The same people who laugh at gypsy fortune tellers take 
economists seriously.
 - Cincinnati Enquirer   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Batch job in UNIX.

2001-07-05 Thread Alexander Wagner

Johan Vikerskog (ECS) wrote:
 But i want dont want to type in the password. I want to have the
 password in the command file.

--password=whatever_it_is instead of -p ?

If that doesn't help, try ./mysql --help

regards
Wagner

-- 
Madness takes its toll. Please have exact change.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Batch job in UNIX.

2001-07-05 Thread Gunther E. Biernat

But i want dont want to type in the password. I want to have
the password in the command file.

echo insert into... | ./mysql -p -u root test
or
cat filename | ...

Perfectly right. And a mysql --help would have told you that you can call it 
(combined with the above) like this:

echo insert into... | mysql -uroot -pwhitehat test

or if you just don't want to type the mysql command parameters all the time, make 
yourself a shell script:

#!/bin/bash
mysql -uroot -pwhitehat test

name it e.g. mymysql, make it executable and call

echo insert into... | mymysql

Have I missed the problem?


mit freundlichen Gruessen / yours sincerely


Gunther E. Biernat
Web Application Engineer
__

RealNetworks GmbH   Tel.: +49-40-415204-24
Weidestraße 128 Fax.: +49-40-415204-11
22083 Hamburg   Mail: [EMAIL PROTECTED]
Germany URL : http://de.real.com
__



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Batch job in UNIX.

2001-07-05 Thread Don Read


On 05-Jul-01 Johan Vikerskog (ECS) wrote:
 If i want to add something into a table with just the mysql command.
 Is this possible.
 
 Like
 ./mysql -p -u root test insert into...


mysql -e cmd
mysql -B cmd
mysql  somescript.sql
cat many*.sql | mysql 
 -- also look at --
mysql --help

-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Batch job in UNIX.

2001-07-05 Thread Don Read


On 05-Jul-01 Johan Vikerskog (ECS) wrote:
 But i want dont want to type in the password. I want to have the password in
 the command file.

No, you don't.
Put your user name  password in ~/.my.cnf
 (as explained in the fine manual).

 
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]