RE: List all databases from command line
"Bonnett, John" <[email protected]> Fri, 14 Sep 2007 16:01:49 +0930
| Newsgroups | gmane.comp.db.mysql.windows |
|---|---|
| Message-ID | <[email protected]> |
Something like mysql -u root -p --execute=3D"SHOW Databases" mysql=20 Should get you what you want. There may be some other options to give you the output in a form and place that suits you. John Bonnett -----Original Message----- From: Jim [mailto:[email protected]]=20 Sent: Friday, 14 September 2007 3:38 PM To: [email protected] Subject: List all databases from command line We use a simple batch file for backups that does a mysqldump on each database on our MySQL 5.0 server. When we create a new database on the server, though, we need to modify the batch file, which is easy to forget. Is there a way, using a command-line program, that I can get a list of all databases on the server so that I can loop over the list and backup each one?=20 -- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/[email protected]