Here is a C-Shell script.
----------
#!/bin/csh
foreach database ( `echo 'show databases' | mysql -s` )
mysqldump -d $database > /home/xah/$database.sql
end
----------
> -----Original Message-----
> From: Xah Lee [mailto:xah@stripped]
> Sent: Wednesday, April 21, 1999 11:08 AM
> To: mysql@stripped
> Subject: dump all databases
>
>
> Is there a way to quickly dump all databases into one directory,
> with files
> corresponding to each database?
>
> That is, I wish to do call one single script that:
>
> 1. find out what databases are available,
> 2. for each database, do a mysqldump -d database_name to /home/xah
>
> This probably can be written in few lines of Perl. Ideas? (I guess my
> question would be how to get the list of databases.)
>
> Thanks.
>
> Xah
> Home: http://www.best.com/~xah/PageTwo_dir/more.html
> Work: http://www.bpower.com/
>
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread2184@stripped
>
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.