views:

49

answers:

1

Hi - I am running several schemas on a single mysql server. One of the schemas has an underscore in its name ("some_name"), and the rest don't. I noticed that in the Admin GUI I am seeing 2 schemas that represent the same one, with one having an escape character before the underscore - so in the schema list I see:

  • schema1
  • schema2
  • some_name
  • some\_name
  • schema3
  • ....

I have no idea how it gets there, and though I tried to, I cannot remove/drop it because it doesn't show up when running mysql from the console. The problem arises when I have to grant users permission on both schemas to enable them to access and manipulate data on either. This is really messed up and I am looking to understand how/why this happens and how this could be avoided (other than renaming the schema to remove the underscore). thanks

+1  A: 

You might want to check your datadir folder. Any folder/director in your datadir will show up as a database on MySQL even if it is not really a database. I often encounter 'backup' database because we use that folder as backup.

SHOW VARIABLES LIKE 'datadir';
Yada