You can also use mysql and query "show databases" as in this sample script I
transcript:
DBS=`mysql -e "show databases"`
for db in $DBS ;
do
if [ "$db" != "Database" ] ; then # skip the title "Database"
included in the output of command DBS.
mysql -e "show tables from $db"
fi
done
Regards,
Rosana
"Gerald L. Clark" wrote:
> mysqlshow should work just fine.
>
> Tim Chambers wrote:
> >
> > Is there any way I can generate a list of the databases in mysql, perhaps
> > with the mysqlshow command and some fancy grep?
> >
> > I'm looking for a list separated by spaces, something that I could use in a
> > bash script.
> >
> > Thanks,
> >
> > Tim
> >
> >
>
> ---------------------------------------------------------------------
> 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