Open mioux opened 4 years ago
FYI : the error is only for this user and 2 specific schemas. Some other users have the same configuration, it works
I've found the problem.
The user already have "ALL PRIVILEGES", I want to downgrade it's rights to just SELECT
If I manually remove "ALL PRIVILEGES" and then sate.apply, it works
nice.
Maybe documentation could be more explicit about how the formula reacts when a use already exists or when it already exists and we downgrade its permissions.
If you have any idea of how this could be done, and want to prepare a PR or discuss it here, feel free to! :)
You could run "REVOKE ALL PRIVILEGES ON db.* FROM 'user'@'host' and then reapply it for example
Your setup
Formula commit hash / release tag
Latest (at 2020/04/02 => 8dffbaf)
Versions reports (master & minion)
Minion :
Master :
Pillar / config used
Bug details
Describe the bug
Select rights does not applies on some DB. I added thoses manually, by copying the query in the error message, it works
Steps to reproduce the bug
Juste do a state.apply
Expected behaviour
Rights are successfully applied
Attempts to fix the bug
Additional context
The user file is separated from the server specific file
We have 3 servers. "1" is the main, "2" and "3" are slaves
pillar/mysql/prdsqlx.sls << this is the common cpnfiguration pillar/mysql/prdsql[num].sls << this is the specific configuration by server (id and ram is different) pillar/users/mysql.sls << this contains only the users
And in pillar/top.sls