Bug #57049 mysqldump unhappy with /var/lib/mysql directories with leading dot
Submitted: 28 Sep 2010 2:59 Modified: 28 Sep 2010 9:43
Reporter: Mark Pace Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.1.50, 5.1, 5.6.99 bzr OS:Linux
Assigned to: CPU Architecture:Any
Tags: regression

[28 Sep 2010 2:59] Mark Pace
Description:
I have some directories in the /var/lib/mysql directory that being with a dot.  Specifically:
.certs
.ssh

When I run mysqldump --all-databases it errors out with a message:
mysqldump: Got error: 1102: Incorrect database name '#mysql50#.certs' when selecting the database

If I rename those directories to:
certs
ssh

mysqldump works fine.  This problem did not occur under mysql 5.0, just when I updated to 5.1.48 and it persists under 5.1.50.

How to repeat:
Install mysql 5.1.48 or 5.1.50 (I'm using the atomic repositories).  Create the following directory:

/var/lib/mysql/.certs

run mysqldump:
mysqldump -u root -ppassword --all-databases > mysqldump.sql

Suggested fix:
Revert to old mysqldump behavior of not caring about those directories.
[28 Sep 2010 5:57] Valeriy Kravchuk
Check related bug #22615. I doubt that this will be fixed.
[28 Sep 2010 7:57] Mark Pace
Interesting.  It would be one thing if this was the behavior from the past, but it is apparently a new behavior.  It is also odd that it doesn't care about them if they don't have the "." on the front.
[28 Sep 2010 9:43] Sveta Smirnova
Thank you for the feedback.

Verified as described. This is regression: bug is not repeatable at least in 5.1.43
[16 Dec 2010 19:09] James Day
If you encounter this the manual now covers it at http://dev.mysql.com/doc/refman/5.1/en/linux-installation-rpm.html :

"If you log in as the mysql user, you may find that MySQL displays “Invalid (old?) table or database name” errors that mention .mysqlgui, lost+found, .mysqlgui, .bash_history, .fonts.cache-1, .lesshst, .mysql_history, .profile, .viminfo, and similar files created by MySQL or operating system utilities. You can safely ignore these error messages or remove the files or directories that cause them if you do not need them. "