[MXS-716] Access Denied: User without global privileges on a schema but with grants only on some tables can't connect if the default schema is specified in the connection string Created: 2016-05-10 Updated: 2020-08-25 Resolved: 2016-08-10 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | N/A |
| Affects Version/s: | 1.4.3 |
| Fix Version/s: | 2.0.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Claudio Nanni | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
If a user has only privileges on some objects/tables of a schema, he can't connect by specifying such schema as default schema for the connection: MySQL [(none)]> show grants for 'pippo'@'%';
------------------------------------------------------------------------------------------------------
Schema specified: $ mysql -upippo -p123 -h127.0.0.1 -P4006 db3 No schema specified: $ mysql -upippo -p123 -h127.0.0.1 -P4006 Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MySQL [(none)]> |
| Comments |
| Comment by Timofey Turenko [ 2016-05-27 ] | |||
|
I can't reproduce it. I tried to create user with privilege only for one table: GRANT SELECT ON d1.t1 TO 'table_privilege'@'%' IDENTIFIED BY 'pass' and then connect: both work. But if I check privileges: MariaDB [d1]> show grants for table_privilege;
----------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------- I can not connect to Maxscale only if I trying with another database: | |||
| Comment by markus makela [ 2016-08-10 ] | |||
|
The user data gathering query was modified to properly include all combinations of user, host and database. |