Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ALL PRIVILEGES", "ON xxx.*" is not recognized during SELECT privilege verification #34036

Closed
RaigorJiang opened this issue Dec 13, 2024 · 0 comments · Fixed by #34037
Closed

Comments

@RaigorJiang
Copy link
Contributor

Bug Report

Related to #32044

Which version of ShardingSphere did you use?

5.5.2-SNAPSHOT master f23d908

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-Proxy

Expected behavior

The user has sufficient privilege and register storage unit should succeed

Actual behavior

Missing required privilege(s) SELECT ON DATABASE

Reason analyze (If you can)

No match for "ALL PRIVILEGES", "ON xxx.*"

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

  1. Create mysql user with privilege
CREATE USER 'jeffrey' IDENTIFIED BY '123456';

grant all privileges on demo_ds_0.* to 'jeffrey'@'%';

show grants for 'jeffrey'@'%';
  1. Register storage unit in Proxy
REGISTER STORAGE UNIT ds_0 (
    URL="jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true",
    USER="jeffrey",
    PASSWORD="123456",
    PROPERTIES("maximumPoolSize"=10)
);
  1. error
image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant