[Discuss] mysql brain teaser...

David Kramer david at thekramers.net
Sun Feb 26 10:58:23 EST 2012


On 02/26/2012 09:17 AM, Stephen Adler wrote:
> Check this out for a mysql brain tease.... I'm working on a new database
> project and on my development system I run a separate mysql database
> server to develop against. So today I found the following in my list of
> databases in my development mysql database server.
> 
> 
> mysql> show databases;
> +--------------------+
> | Database           |
> +--------------------+
> | information_schema |
> | #mysql50#.emacs.d  |
> | clinicaldb         |
> | mysql              |
> | performance_schema |
> | test               |
> +--------------------+
> 6 rows in set (0.00 sec)
> 
> So what is this #mysql50#.emacs.d database? I did a quick search and
> found that #mysql50# prefix means that a database was upgrade which my
> have happened as I've upgraded through various releases of Fedora. But
> the .emacs.d is the weird part. The database contains `.` characters
> which are supposidly not allowed according to the following link
> 
> http://dev.mysql.com/doc/refman/5.0/en/identifiers.html
> 
> does anyone have a suggestion as to how I can check to see what tables
> are in this database and/or how to drop the database?

The brute force answer to both questions is to mysqldump all tables (so
you don't need to specify that table name anywhere), and look at the
dump to see what's in that database.

To remove it, simply remove that table from the dump with your favorite
editor (use emacs for extra irony), drop all databases, and reload the
dump which no longer contains that database.




More information about the Discuss mailing list