I am trying to use TOAD to connect to a remote mysql server but keep getting access denied for '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.
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.
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. 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. To fix this, just add a grant permission to MY-USER like so:
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.
Try to connect as root
, and grant SELECT privilege to user 'MY-USER'@'MY-LOCAL-HOSTNAME'. You can grant global-level SELECT
privilege, database-level or table-level. 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.