On Fri, Mar 19, 2004 at 11:50:43AM -0500, Charles Hauser wrote:
> 
> I'm interested in writing a cron job to backup mysql that will:
>  - Backup all the global information first (users and groups, typically)

This information is in the mysql database; unlike postgres, there's no
concept of ''global'' system tables like pg_*.  So you'd use mysqldump,
or mysqlhotcopy, or similar on the mysql database just as you'd use
them on any other database.

>  - Backup each database independently (not dumpall)

You can get a list of databases from a commandline:

% mysql --batch -e 'show databases'

This is a newline-separated list of databases, which should easily fit
into your for loop.

--keith

-- 
[EMAIL PROTECTED]
alt.os.linux.slackware FAQ:  http://wombat.san-francisco.ca.us/cgi-bin/fom


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

Reply via email to