[英]Toad for MySQL Access Denied But Workbench connects fine
I am trying to use TOAD to connect to a remote mysql server but keep getting access denied for 'user@laptop-hostname'. 我正在尝试使用TOAD连接到远程mysql服务器,但继续拒绝访问'user @ laptop-hostname'。
Which would make me think that this is a permissions issue except for the fact that I can connect with MYSQL Workbench without problems. 这会让我觉得这是一个权限问题,除了我可以毫无问题地连接MYSQL Workbench。
The other weird thing is that I can connect to see the tables and get a list of DBs with TOAD but when I go to do a snapshot or compare I get an access denied error. 另一个奇怪的事情是我可以连接查看表并获取带有TOAD的DB列表但是当我去做快照或比较时我得到访问被拒绝错误。
Error: 错误:
"SELECT command denied to user 'MY-USER'@'MY-LOCAL-HOSTNAME' for table 'db' Quest.Compare.Schema.MySQl.DBModel
Any ideas? 有任何想法吗?
EDIT: I should also mention that I can execute queries fine using TOAD. 编辑:我还应该提一下,我可以使用TOAD执行查询。 Seems to be a problem with snapshot and compare.
似乎是快照和比较的问题。
I recently had to fix this myself. 我最近不得不自己解决这个问题。 In this case, the DB table toad is referring to is the DB table of the mysql schema.
在这种情况下,DB表toad是指mysql架构的DB表。 To fix this, just add a grant permission to MY-USER like so:
要解决此问题,只需向MY-USER添加授权权限,如下所示:
GRANT SELECT ON 'mysql'.'db' TO 'my-user'@'my-local-hostname';
So, error means that you can connect to the server using specified account (MySQL user), but user does not have required privileges. 因此,错误意味着您可以使用指定的帐户(MySQL用户)连接到服务器,但用户没有所需的权限。
Try to connect as root
, and grant SELECT privilege to user 'MY-USER'@'MY-LOCAL-HOSTNAME'. 尝试以
root
身份连接,并将SELECT权限授予用户'MY-USER'@'MY-LOCAL-HOSTNAME'。 You can grant global-level SELECT
privilege, database-level or table-level. 您可以授予全局级
SELECT
权限,数据库级或表级。 For example - 例如 -
-- Global level
GRANT SELECT ON *.* TO 'MY-USER'@'my-local-hostname';
-- Database level
GRANT SELECT ON <database_name>.* TO 'MY-USER'@'my-local-hostname';
-- Table level
GRANT SELECT ON TABLE <database_name>.<table_name> TO 'MY-USER'@'my-local-hostname';
Then reconnect as 'MY-USER'@'my-local-hostname' again. 然后再次重新连接为'MY-USER'@'my-local-hostname'。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.