Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

RE: List all databases from command line

From: Harrison, Scott C <scott.c.harrison(at)lmco.com>
Date: Fri Sep 14 2007 - 11:40:09 EDT


You can also use --skip-column-names to make the output a little cleaner.

Peace,
Scott

-----Original Message-----

From: Bonnett, John [mailto:John.Bonnett@vision.zeiss.com] Sent: Friday, September 14, 2007 2:32 AM To: jj@zolx.com; win32@lists.mysql.com
Subject: RE: List all databases from command line

Something like

mysql -u root -p --execute="SHOW Databases" mysql

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:jj@zolx.com]
Sent: Friday, 14 September 2007 3:38 PM
To: win32@lists.mysql.com
Subject: List all databases from command line

Do you need help?X

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?

--

MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32 To unsubscribe:
http://lists.mysql.com/win32?unsub=scott.c.harrison@lmco.com

--

MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/win32?unsub=lists@pantek.com Received on Fri Sep 14 11:40:29 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 10:15:26 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library