0

I installed MaxScale 2.4.4 with Galera Cluster. I can access to galera with maxscale user but I can't login with other users to maxscale. I created a user in galera and another user with same username with maxctrl but it return Access denied error. How I can create users for applications in maxscale 2.4.4.

maxscale.cnf

[maxscale]
threads=1

[Galera-Monitor]
type=monitor
module=galeramon
servers=server1,server2,server3
user=maxscale
password=qwe123
disable_master_failback=1

[Galera-Service]
type=service
router=readwritesplit
servers=server1,server2,server3
user=maxscale
password=qwe123

[Galera-Listener]
type=listener
#router=readwritesplit
service=Galera-Service
protocol=MySQLClient
port=3306

[Write-Service]
type=service
router=readconnroute
router_options=master
servers=server1, server2, server3
user=maxscale
password=qwe123

[Read-Service]
type=service
router=readconnroute
router_options=slave
servers=server1, server2, server3
user=maxscale
password=qwe123

#[Splitter-Service]
#type=service
#router=readwritesplit
#servers=server1,server2,server3
#user=maxscale
#password=qwe123

#[Splitter-Listener]
#type=listener
#service=Splitter-Service
#protocol=MariaDBClient
#port=3306

[CLI]
type=service
router=cli

[CLI-Listener]
type=listener
service=CLI
protocol=maxscaled
address=0.0.0.0
port=6603

[server1]
type=server
address=192.168.122.93
port=3306
protocol=MySQLBackend

[server2]
type=server
address=192.168.122.17
port=3306
protocol=MySQLBackend

[server3]
type=server
address=192.168.122.13
port=3306
protocol=MySQLBackend

I found enable_root_user=1 for login to maxscale with root user but I don't know where should I add it;

maxctrl list servers
┌─────────┬────────────────┬──────┬─────────────┬─────────────────────────┬──────┐
│ Server  │ Address        │ Port │ Connections │ State                   │ GTID │
├─────────┼────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server1 │ 192.168.122.93 │ 3306 │ 0           │ Master, Synced, Running │      │
├─────────┼────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server2 │ 192.168.122.17 │ 3306 │ 0           │ Slave, Synced, Running  │      │
├─────────┼────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server3 │ 192.168.122.13 │ 3306 │ 0           │ Slave, Synced, Running  │      │
└─────────┴────────────────┴──────┴─────────────┴─────────────────────────┴──────┘

maxscale runs at 192.168.122.222 and I want all applications connect to this address with thier own user;

2
  • Check the "hostname" in the grant tables. – Rick James Dec 29 '19 at 6:51
  • @RickJames Which hostname? – haj_baba Dec 29 '19 at 9:42
0

I asked same question in stackoverflow. It trun out the problem was from maxscale user permissions.

GRANT SELECT ON mysql.user TO 'maxscale'@'maxscalehost';
GRANT SELECT ON mysql.db TO 'maxscale'@'maxscalehost';
GRANT SELECT ON mysql.tables_priv TO 'maxscale'@'maxscalehost';
GRANT SELECT ON mysql.roles_mapping TO 'maxscale'@'maxscalehost';
GRANT SHOW DATABASES ON *.* TO 'maxscale'@'maxscalehost';

https://stackoverflow.com/a/59540995/5456910

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.