[MXS-1675] "Unknown database" while connecting via readconnroute Created: 2018-02-20 Updated: 2020-08-25 Resolved: 2018-03-26 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | readconnroute |
| Affects Version/s: | 2.1.12 |
| Fix Version/s: | 1.4.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Valerii Kravchuk | Assignee: | Johan Wikman |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
It seems there is a case when default database can not be set at command line while using readconnroute router of MaxScale 2.1.12. The problem looks as follows:
While this works:
In the log we see:
Service is configured as:
User has the following rights:
|
| Comments |
| Comment by markus makela [ 2018-02-20 ] | ||||||||||||||
|
The output of this SQL could help figure out why it fails. Another possitibity is that there exists a 'user1'@'127.0.0.1' and the grants for this user override the ones for 'user1'@'%'. | ||||||||||||||
| Comment by Johan Wikman [ 2018-02-20 ] | ||||||||||||||
|
I have, based on the provided information, replicated the situation as closely as possible but was not able to repeat the problem:
| ||||||||||||||
| Comment by markus makela [ 2018-03-06 ] | ||||||||||||||
|
Please check whether the MaxScale user has the SHOW DATABASES grant. | ||||||||||||||
| Comment by Johan Wikman [ 2018-03-26 ] | ||||||||||||||
|
valerii Could you please check that the MaxScale user (that is, the user specified in the service section in the MaxScale configuration file)
has the SHOW DATABASES grant. | ||||||||||||||
| Comment by Valerii Kravchuk [ 2018-03-26 ] | ||||||||||||||
|
SHOW DATABASES grant was indeed missing for the user set for ReadConnRoute (user=maxscale in the initial description). The need for this grant is clearly mentioned in https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-14/maxscale-configuration-usage-scenarios/#service, so this is not a bug. Sorry for wasting your time. |