Re: batch mode

2007-05-02 Thread Mogens Melander

On Wed, May 2, 2007 08:55, Mogens Melander wrote:
>
> On Tue, May 1, 2007 22:15, Brown, Charles wrote:
>>
>> Because I am running on batch mode therefore I'm trying to direct my
>> session output to a file -- meaning stdout. But I'm having a problem.
>> For instance this input: "use test_db" gave me no output but this input
>> "show tables" gave me an output.
>>
>> What is missing, what's the trick. Help me Y'all.
>
> You could try something like:
>
> mysql -u xxx -pyyy -e 'select * from dbname;'

Argh, that should have been:

mysql -s -u xxx -pyyy -e 'show tables from dbname;'

> mysql -u xxx -pyyy -e 'select * from dbname.tblname;'

And:

mysql -s -u xxx -pyyy -e 'select * from dbname.tblname;'

>
> --
> Later
>
> Mogens Melander
> +45 40 85 71 38
> +66 870 133 224
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by OpenProtect(http://www.openprotect.com), and is
> believed to be clean.
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>


-- 
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224



-- 
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: batch mode

2007-05-01 Thread Mogens Melander

On Tue, May 1, 2007 22:15, Brown, Charles wrote:
>
> Because I am running on batch mode therefore I'm trying to direct my
> session output to a file -- meaning stdout. But I'm having a problem.
> For instance this input: "use test_db" gave me no output but this input
> "show tables" gave me an output.
>
> What is missing, what's the trick. Help me Y'all.

You could try something like:

mysql -u xxx -pyyy -e 'select * from dbname;'

mysql -u xxx -pyyy -e 'select * from dbname.tblname;'

-- 
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224



-- 
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: batch mode

2003-07-29 Thread Dan Nelson
In the last episode (Jul 29), Peter L. Berghold said:
> On Tue, 2003-07-29 at 15:19, azamka wrote:
> > 
> > [EMAIL PROTECTED] usr]# mysql security < select *  from machine;
> > -bash: select: No such file or directory
> > 
> 
> 
> EEK! What you told the shell to do was open a file called "select" and
> redirect it to mysql. 
> 
> What you meant to do was "echo 'select * from machine' | mysql security"

or better yet, 

mysql -e "select * from machine" security

-- 
Dan Nelson
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: batch mode

2003-07-29 Thread Peter L. Berghold
On Tue, 2003-07-29 at 15:19, azamka wrote:
> 
> [EMAIL PROTECTED] usr]# mysql security < select *  from machine;
> -bash: select: No such file or directory
> 


EEK! What you told the shell to do was open a file called "select" and
redirect it to mysql. 

What you meant to do was "echo 'select * from machine' | mysql security"


-- 

Peter L. Berghold[EMAIL PROTECTED]
Dog event enthusiast, brewer of Belgian (style) Ales.  Happiness is
having your contented dog at your side and a Belgian Ale in your glass.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: batch mode

2003-07-29 Thread gerald_clark


azamka wrote:

I am trying to right sql statement on the shell prompt but its not going 
through.
Here is the statement:

[EMAIL PROTECTED] usr]# mysql security < select *  from machine;
-bash: select: No such file or directory
echo  "select * from machine" | mysql security

or  put your select statement in a file and:
mysql security < sqlfile
It is asking for the text file. And it works fine with the text file. I am 
wondering how can we write a sql statement on the command prompt. I looked 
into the manual but didnt find it. Is there anyone who can tell me the exact 
syntax. Please help



 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Batch mode / stored prodecure question?

2003-02-10 Thread Jerry
Pass it to a script or handeler program that does the dB work then passes
back what you need to the radius ?

Jerry

-
Jeremy Hutchings
Apps R&D
Cable and Wireless
-
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, February 07, 2003 5:27 PM
Subject: Re: Batch mode / stored prodecure question?


> Hmm, I thought this question I posted last weekend was a pretty
> good one, however, no replies have been posted :-(
>
> I am new to MySQL and this mailing list, is the the proper place and
format
> for questions of this type?
>
> Regards,
> Bill
>
> > Hi all:
> >
> > I am building a database containing usage information for a wireless
> > ISP application. I am using a RADIUS server (Steel Belted Radius on Win
> > 2K) to handle RADIUS events from the network hardware and then write to
> > a MySQL database.
> >
> > Everything works fine but I have a problem: the RADIUS server can only
> > execute a single SQL statement. This is fine for creating a usage
> > record, but I need to do more processing and execute several SQL
> > statements in order to do all the usage tracking I need.
> >
> > The RADIUS server can call a "stored procedure" and pass parameters to
> > the procedure. This is what I need. I see that MySQL has a "batch
> > mode", but I do not see any mention of how I could pass parameters to a
> > MySQL batch file. Can I do this, if so, how?
> >
> > I see that stored procedures are being added in a future release of
> > MySQL, do I need to wait for this?
> >
> > Thanks in advance,
> > Bill Brownrigg
> > Project Manager
> > DSL Holdings, Inc.
> >
> >
> >
> >
> >
> > -
> > Before posting, please check:
> >   http://www.mysql.com/manual.php   (the manual)
> >   http://lists.mysql.com/   (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]> To
> > unsubscribe, e-mail
> > <[EMAIL PROTECTED]> Trouble
> > unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Batch mode / stored prodecure question?

2003-02-09 Thread bill
Hmm, I thought this question I posted last weekend was a pretty
good one, however, no replies have been posted :-(

I am new to MySQL and this mailing list, is the the proper place and format
for questions of this type?

Regards,
Bill

> Hi all:
>
> I am building a database containing usage information for a wireless
> ISP application. I am using a RADIUS server (Steel Belted Radius on Win
> 2K) to handle RADIUS events from the network hardware and then write to
> a MySQL database.
>
> Everything works fine but I have a problem: the RADIUS server can only
> execute a single SQL statement. This is fine for creating a usage
> record, but I need to do more processing and execute several SQL
> statements in order to do all the usage tracking I need.
>
> The RADIUS server can call a "stored procedure" and pass parameters to
> the procedure. This is what I need. I see that MySQL has a "batch
> mode", but I do not see any mention of how I could pass parameters to a
> MySQL batch file. Can I do this, if so, how?
>
> I see that stored procedures are being added in a future release of
> MySQL, do I need to wait for this?
>
> Thanks in advance,
> Bill Brownrigg
> Project Manager
> DSL Holdings, Inc.
>
>
>
>
>
> -
> Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]> To
> unsubscribe, e-mail
> <[EMAIL PROTECTED]> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php