mysql - MySQL 管理中奇怪的模式行为
我在单个 mysql 服务器上运行多个模式。其中一个模式的名称中包含下划线(“some_name”),而其余模式则没有。我注意到在管理 GUI 中我看到 2 个代表同一个模式的模式,其中一个在下划线之前有一个转义字符 - 因此在模式列表中我看到:
- schema1
- schema2
- some_name
- some\_name
- schema3
- ....
我不知道它是如何到达那里的,尽管我尝试这样做,但我无法删除/删除它,因为从控制台运行 mysql 时它不显示。当我必须授予用户对两个模式的权限以使他们能够访问和操作其中一个模式的数据时,问题就出现了。这真的很混乱,我希望了解这种情况如何/为何发生以及如何避免这种情况(除了重命名架构以删除下划线)。谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能想检查您的 datadir 文件夹。 datadir 中的任何文件夹/目录都会在 MySQL 上显示为数据库,即使它不是真正的数据库。我经常遇到“备份”数据库,因为我们使用该文件夹作为备份。
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.