Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
2.1.12
-
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:
mysql -u user1 -p -h 127.0.0.1 db1
|
ERROR 1049 (42000): Unknown database 'db1'"
|
While this works:
mysql -u user1 -p -h 127.0.0.1
|
...
|
Server version: 10.0.0 2.1.12-maxscale MariaDB Enterprise Certified Binary, wsrep_25.20.rc3fc46e
|
...
|
MySQL [(none)]> use db1;
|
Reading table information for completion of table and column names
|
...
|
Database changed
|
MySQL [db1]>
|
In the log we see:
...
|
2018-02-14 17:08:13 notice : [MySQLAuth] [Single Node Router] Loaded 31 MySQL users for listener Single Node Listener.
|
2018-02-14 17:08:13 warning: [MySQLAuth] Single Node Router: login attempt for user 'user1'@[127.0.0.1]:58084, authentication failed.
|
...
|
Service is configured as:
[maxscale]
|
threads=2
|
|
[s1]
|
type=server
|
address=s1.dom
|
port=3306
|
protocol=MySQLBackend
|
priority=1
|
node_a=100
|
node_b=0
|
node_c=0
|
|
[s2]
|
type=server
|
address=s2.dom
|
port=3306
|
protocol=MySQLBackend
|
priority=2
|
node_a=0
|
node_b=100
|
node_c=0
|
|
[s3]
|
type=server
|
address=s3.dom
|
port=3306
|
protocol=MySQLBackend
|
priority=3
|
node_a=0
|
node_b=0
|
node_c=100
|
|
[Galera Monitor]
|
type=monitor
|
module=galeramon
|
servers=s1,s2,s3
|
user=maxscale
|
passwd=x
|
monitor_interval=1000
|
live_nodes=$NODELIST synced_nodes=$SYNCEDLIST
|
use_priority=true
|
|
[Single Node Router]
|
type=service
|
router=readconnroute
|
servers=s1,s2,s3
|
user=maxscale
|
passwd=x
|
localhost_match_wildcard_host=1
|
router_options=synced
|
weightby=node_b
|
User has the following rights:
| GRANT USAGE ON *.* TO 'user1'@'%' IDENTIFIED BY PASSWORD |
|
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES ON `db1`.* TO 'user1'@'%' |
|