On 17 Aug 2001 06:13:08 +0000, Munish Malhotra wrote:
> Dear Sir,
> Can you please tell me how to access data from a MySql database using a Bash Shell
>Script i.e. how to connect to a MySql database and retrive records and to disconnect
>from database.
> I shall be very thankful to you.
[tonu@x153 tonu]$ /usr/local/mysql/bin/mysql -e "SELECT NOW(); SELECT
VERSION()"
+---------------------+
| NOW() |
+---------------------+
| 2001-08-17 14:55:42 |
+---------------------+
+-----------------+
| VERSION() |
+-----------------+
| 4.0.0-debug-log |
+-----------------+
[tonu@x153 tonu]$
There are some additional flags which can be used to turn headers and
boxes around data off if you need to.
--
For technical support contracts, goto https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Tonu Samuel <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Security Administrator
/_/ /_/\_, /___/\___\_\___/ Hong Kong, China
<___/ www.mysql.com
---------------------------------------------------------------------
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