LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-08-2008, 10:52 AM   #1
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
how to find empty db's in mysql


hi, guys

does anyone know how to "select" or "find" db's in mysql which are empty. I have about 100 db's but like most of them are empty, so I would like to find out which are empty and remove.

Thanks guys!
 
Old 12-08-2008, 11:28 AM   #2
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Rep: Reputation: 39
Why not check the datadir for size of databases?
 
Old 12-08-2008, 11:32 AM   #3
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
You could use phpMyAdmin to examine each database and selectively remove the empty ones. This would probably be the best way to ensure that no mistakes are made in deleting a non-empty database. It would take all of 20 minutes or less to go thru 100 databases.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File system points to MySQL db's in wrong cPanel nogerorob Linux - Software 0 04-18-2006 09:24 PM
How to copy mysql db's from hardisk to new server? nbier Linux - Software 4 09-01-2004 03:24 PM
php4 mysql, installation, php-pages with mysql info stay empty dnla Linux - Software 2 03-14-2004 02:54 PM
Backing up large MySQL DB's WeNdeL Linux - Software 5 11-29-2003 09:34 AM
Lost all my MySQL DB's, help amp2000 Linux - General 7 04-17-2003 01:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration