用户无法在mysql工作台中看到数据库 [英] User cannot see databases in mysql workbench

查看:141
本文介绍了用户无法在mysql工作台中看到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用本教程来学习Spring Roo. >.所以,我所做的是:

I'm trying to learn Spring Roo using this tutorial. So, what I did was:

  • 转到mysql工作台
  • 创建一个名为"pizzashop"的新架构
  • 通过服务器管理帐户访问localhost
  • 在用户和特权"中使用名称"pizzashop"和密码"pizzashop"创建一个新用户,并限制与%匹配的主机的连接

当我尝试使用此帐户连接到服务器时,我发现它看不到任何数据库

when I tried to connect to the server using this account I noticed that it couldn't see any database

我尝试在模式特权"中显式创建一个条目,以允许"pizzashop"用户看到"pizzashop"模式,但它不起作用

I tried creating an entry in 'schema privileges' explicity allowing the 'pizzashop' user to see the 'pizzashop' schema, but it didn't work

希望您可以在这里帮助我.我不知道这是工作台问题还是mysql问题.

Hope you can help me here. I don't know if it's a Workbench problem or a mysql problem.

修改> 向用户帐户添加了另一个条目,该条目具有与另一个条目相同的特征,但是具有"localhost"而不是%

Edit> Added to the User Accounts one more entry with the same characteristics as the other but with 'localhost' instead of %

在架构特权中添加了一个条目,内容为host:localhost schema:pizzashop以及所有对象和ddl权限(这是我对Pizzashop用户唯一的权限)

Added to the schema privileges an entry saying host:localhost schema:pizzashop and all object and ddl rights (this is the only one I have for the pizzashop user)

不过,当我使用Pizzashop用户连接到localhost时,不会出现任何模式

Still, when I connect to localhost using the user pizzashop no schemas appear

推荐答案

在这种情况下,将localhost作为要连接的计算机的其他用户根本没有帮助.只需连接服务器即可(并且您的连接已经通过使用%用于"pizzashop").

The additional user with localhost as machine to connect from does not help at all in this case. It's just something needed for connecting to the server (and your connection works for 'pizzashop' already by using %).

不确定您的问题出在哪里,但是我刚刚在MySQL Workbench 6.0.7中(针对5.6服务器)进行了测试:

Not sure what's going wrong in your case but I just tested (against a 5.6 server) in MySQL Workbench 6.0.7:

  1. 创建一个新用户"test".没有密码,没有权限,标准身份验证.
  2. 创建与同一服务器的新连接(实际上,我复制了现有服务器,清除了密码并更改了用户名).
  3. 打开此新连接(其他连接可以保持打开状态).
  4. 除非您启用了系统表,否则不会向测试"用户显示任何模式,在这种情况下,用户至少会看到"performance_schema".
  5. 返回到管理员连接,并为单个架构添加架构特权(例如测试").
  6. 关闭测试连接,然后重新打开.现在,除了"performance_schema"之外,测试用户还应该看到架构测试.
  7. 返回到管理员连接,并为"test"添加"SHOW DATABASES"全局priv.
  8. 关闭测试连接,然后重新打开.现在,测试"用户应该看到服务器中的所有模式,但是在扩展模式树时(其中在第5点中为该用户启用的测试"模式除外),它们中没有任何对象.

如果这对您有用,那么也可以轻松地将其应用于您自己的用户.

If that works for you it should be easy to apply this also to your own user.

这篇关于用户无法在mysql工作台中看到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆