gh-ost
gh-ost copied to clipboard
wildcards in grants are not supported
We have a lot of databases which are named like "something_data_<client>". If I give these grants to ghost user :
GRANT ALL PRIVILEGES ON `something\_data\_%`.* TO 'ghost'@'%'
It fails with :
ERROR User has insufficient privileges for migration. Needed: SUPER|REPLICATION CLIENT, REPLICATION SLAVE and ALL on `something_data_<client>`.*
If I connect with mysql client, the user can see the databases and make changes.
It's most probably in the way the permissions are checked in gh-ost/go/logic/inspect.go
validateGrants()
. I can't think of a non-ugly solution to check that though...
@babinomec have you found a solution?
We use RDS (Aurora) and have the same issue.
It fails with:
FATAL 2021-08-06 12:57:23 ERROR User has insufficient privileges for migration. Needed: SUPER|REPLICATION CLIENT, REPLICATION SLAVE and ALL on `mydb`.*.
As far as I recall, no.
We ended up needing gh-ost on lots of different databases/tables so I think we gave permissions on everything and limited on the host part.