Mysql command from the shell

Mysql command from the shell

Post by Ilyas Kes » Wed, 21 Aug 2002 20:41:32



hi list

Can I also execute mysql commands from the shell.

Something like this:

% mysql -u root -pmypass --execute=use mydb; select * from mytable;

Thanks..

ilyas

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



Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

 
 
 

Mysql command from the shell

Post by David BORDA » Wed, 21 Aug 2002 20:48:50


IK> hi list
IK> Can I also execute mysql commands from the shell.
IK> Something like this:
IK> % mysql -u root -pmypass --execute=use mydb; select * from mytable;

You can do something like this i think :
% mysql -u root -pmypass mydb --execute='select * from mytable'

David

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



Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

 
 
 

1. Mysql commands from Linux shell

Hi to all:
I have a linux script and I need it can execute some mysql commands.
Is it possible? If possible, how?

Best regards,
Fabio Galarraga

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



Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

2. Minimax tree search algorithms

3. How to get my shell readline settings in mysql command line tool?

4. description of musicam's subscriber access needed

5. piping blob into shell command (tar)

6. IE home page setting and runonce.msn.com

7. running sql commands from a shell

8. remove

9. run shell command from pl/pgsql

10. MySQL + PHP : "Commands out of sync; You can't run this command now"

11. multiple commands to mysql from regular command line

12. MySQL + PHP : 'Commands out of sync; You can't run this command now'

13. Q: How to set autocommit=0 while shell>mysql datablse < data.sql