Bug #7443 Extra directories in /var/lib/mysql show up as databases
Submitted: 20 Dec 2004 21:07 Modified: 31 Jan 2005 18:07
Reporter: Mark Komarinski Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.20 OS:Linux (Red Hat EL AS 3)
Assigned to: Paul DuBois CPU Architecture:Any

[20 Dec 2004 21:07] Mark Komarinski
Description:
By convention, we have directories for backups located under where the database is installed, so backups for mysql go in /var/lib/mysql/backup.  Both this directory and /var/lib/mysql are separate parititions in LVM.

When I show databases, both backup and lost+found show up as available databases.  Empty databases with those same names show up in backups.

While this isn't a big deal, it may cause confusion for our users.  Any way of preventing mysql from thinking these directories are databases?

How to repeat:
Create random-named directory in /var/lib/mysql
Restart mysql
[31 Dec 2004 2:10] Hartmut Holzgraefe
Nobody but the mysql server itself should touch the data directory
but at least the "lost+found" argument is valid, system directories
like this shouldn't show up as databases.
[31 Jan 2005 18:07] Paul DuBois
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).

Additional info:

I've mentioned this behavior at:

http://dev.mysql.com/doc/mysql/en/create-database.html

It should show up on the web site soon.