[MXS-4963] Docu for SchemaRouter Simple Sharding does not work Created: 2024-02-03  Updated: 2024-02-04

Status: Open
Project: MariaDB MaxScale
Component/s: Documentation, schemarouter
Affects Version/s: 23.08.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Oli Sennhauser Assignee: markus makela
Resolution: Unresolved Votes: 0
Labels: documentation, maxscale, schemarouter
Environment:

Linux n.a.



 Description   

Docu here https://mariadb.com/kb/en/mariadb-maxscale-2308-simple-sharding-with-two-servers/ states
"The database users should be configured according to the configuration guide."
pointing to https://mariadb.com/kb/en/mariadb-maxscale-2308-mariadb-maxscale-configuration-guide/

But on the indicated location I cannot find any advice how to create the user.

The correct location is possibly here:

https://mariadb.com/kb/en/mariadb-maxscale-2308-setting-up-mariadb-maxscale/#creating-a-user-account-for-maxscale

But when I create a user like this:

CREATE USER 'maxscale'@'%' IDENTIFIED BY 'maxscale_pw';
GRANT SELECT ON mysql.user TO 'maxscale'@'%';
GRANT SELECT ON mysql.db TO 'maxscale'@'%';
GRANT SELECT ON mysql.tables_priv TO 'maxscale'@'%';
GRANT SELECT ON mysql.columns_priv TO 'maxscale'@'%';
GRANT SELECT ON mysql.procs_priv TO 'maxscale'@'%';
GRANT SELECT ON mysql.proxies_priv TO 'maxscale'@'%';
GRANT SELECT ON mysql.roles_mapping TO 'maxscale'@'%';
GRANT SHOW DATABASES ON . TO 'maxscale'@'%';

Then I get an error like this:

2024-02-03 07:46:54 notice : Started REST API on [127.0.0.1]:8989
2024-02-03 07:46:54 notice : shard2 sent version string '10.11.6-MariaDB-log'. Detected type: MariaDB, version: 10.11.6.
2024-02-03 07:46:54 notice : shard3 sent version string '10.11.6-MariaDB-log'. Detected type: MariaDB, version: 10.11.6.
2024-02-03 07:46:54 notice : shard1 sent version string '10.11.6-MariaDB-log'. Detected type: MariaDB, version: 10.11.6.
2024-02-03 07:46:54 notice : Server 'shard2' charset: latin1_swedish_ci
2024-02-03 07:46:54 notice : Server 'shard3' charset: latin1_swedish_ci
2024-02-03 07:46:54 notice : Server 'shard1' charset: latin1_swedish_ci
2024-02-03 07:46:54 warning: Error during monitor permissions test for server 'shard1': Query 'SHOW SLAVE STATUS;' failed: 'Access denied; you need (at least one of) the SUPER, SLAVE MONITOR privilege(s) for this operation'.
2024-02-03 07:46:54 warning: Error during monitor permissions test for server 'shard2': Query 'SHOW SLAVE STATUS;' failed: 'Access denied; you need (at least one of) the SUPER, SLAVE MONITOR privilege(s) for this operation'.
2024-02-03 07:46:54 warning: Error during monitor permissions test for server 'shard3': Query 'SHOW SLAVE STATUS;' failed: 'Access denied; you need (at least one of) the SUPER, SLAVE MONITOR privilege(s) for this operation'.
2024-02-03 07:46:54 notice : [mariadbmon] Gtid domain id of primary has changed: 0 -> -1.

So documentation seems to be wrong. Further investigating is done...



 Comments   
Comment by markus makela [ 2024-02-03 ]

If you are using mariadbmon, the following grants are required: https://mariadb.com/kb/en/mariadb-maxscale-2308-mariadb-monitor/#required-grants

Comment by Oli Sennhauser [ 2024-02-04 ]

Hi again, Markus

Thanks again for the hint. With the right documentation it works much better! All tests passed.
Do you hand it over to Ian for documentation enhancement suggestion?

Further tests will continue and issues reported... I have some findings in the pipeline...

Regards,
Oli

Comment by markus makela [ 2024-02-04 ]

The tutorial is out of date and needs to be updated to reflect the changes that have happened since it was written.

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