[MXS-4258] Add permission for SHOW DATABASES for Xpand Service to work Created: 2022-08-24  Updated: 2022-08-29  Resolved: 2022-08-29

Status: Closed
Project: MariaDB MaxScale
Component/s: Documentation, xpandmon
Affects Version/s: 6.4.1
Fix Version/s: 6.4.2

Type: Bug Priority: Major
Reporter: Manjinder Nijjar Assignee: Johan Wikman
Resolution: Fixed Votes: 0
Labels: None
Environment:

three node Xpand 6.0.5 with Maxscale 6.4.1


Sprint: MXS-SPRINT-165

 Description   

We should add following permission as a must have for Xpand service to work. Without it, tools like sysbench throw "Unknown database" error even though database exists on Xpand backend.

I could not find this permission in the required grants in the docs.

grant SHOW DATABASES on *.* to maxscale@'maxscalehost'; 

I get following error when I run Sysbench via maxscale on Xpand (without SHOW DATABASES) even though database exists on the server:

2022-08-24 19:46:32   info   : (43) Found matching user entry 't1'@'vqc008a.colo.sproutsys.com' for client 't1'@'10.2.14.193' but user tried to access non-existing database 'sysbench'.
2022-08-24 19:46:32   warning: (49) [MariaDBProtocol] Authentication failed for user 't1'@[10.2.14.193] to service 'Read-Only-Service'. Originating listener: 'Read-Only-Listener'. MariaDB error: 'Unknown database 'sysbench''.

Database Exists on Xpand server:

MySQL [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| sysbench           |
| test               |
+--------------------+
3 rows in set (0.01 sec)

All tools work fine once SHOW DATABASE permissions are granted.



 Comments   
Comment by Johan Wikman [ 2022-08-25 ]

I suppose you use the same user/password for both the Xpand monitor and the service?

It's the service user that needs the SHOW DATABASE grant, the monitor user does not need that. However, if you use the same user for both the service and the monitor, this distinction is blurred.

But yes, this paragraph must be updated https://mariadb.com/kb/en/mariadb-maxscale-6-authentication-modules/#xpand

Comment by Manjinder Nijjar [ 2022-08-25 ]

johan.wikmanThanks for the explanation. I have updated the bug.

Generated at Thu Feb 08 04:27:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.