Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
6.3.1
-
None
Description
配置maxscale 的config_sync_cluster 时,未创建mysql.maxscale_config表
请问这个表是需要手动创建吗?如果是,我应该从哪里获取到该DDL呢?
下面是我的配置信息:
[MaxScale]
threads=auto
log_info=0
log_debug=1
log_notice=0
log_warning=1
max_auth_errors_until_block=0
log_debug=1
admin_host=0.0.0.0
admin_secure_gui=0
admin_auth=1
admin_enabled=1
admin_gui=1
admin_log_auth_failures=true
config_sync_cluster=master
config_sync_user=smartms
config_sync_password=*****
=============================
Note: smartms 的权限是确认没有问题的
Attachments
Activity
Translated:
When configuring config_sync_cluster for maxscale, the mysql.maxscale_config table is not created.
Do I need to create this table manually? If yes, where should I get the DDL from?
Here is my configuration information.
[MaxScale]
threads=auto
log_info=0
log_debug=1
log_notice=0
log_warning=1
max_auth_errors_until_block=0
log_debug=1
admin_host=0.0.0.0
admin_secure_gui=0
admin_auth=1
admin_enabled=1
admin_gui=1
admin_log_auth_failures=true
config_sync_cluster=master
config_sync_user=smartms
config_sync_password=*****
=============================
Note: The smartms permissions are confirmed to be OK
The config_sync_user must have the following permissions on the mysql.maxscale_config table:
GRANT SELECT, INSERT, UPDATE, CREATE ON `mysql`.`maxscale_config`
|
The table will be created automatically by MaxScale.
Documentation for config_sync_user: https://mariadb.com/kb/en/mariadb-maxscale-6-mariadb-maxscale-configuration-guide/#config_sync_user
Documentation for configuration synchronization: https://mariadb.com/kb/en/mariadb-maxscale-6-mariadb-maxscale-configuration-guide/#configuration-synchronization
Can you add the output of the following query?
SHOW GRANTS FOR smartms
|
thanks, markus
This is about the permissions of the smartms user:
MariaDB [(none)]> SHOW GRANTS FOR smartms;
-----------------------------------------------------------------------------------------------------------------------------------
Grants for smartms@% |
-----------------------------------------------------------------------------------------------------------------------------------
GRANT ALL PRIVILEGES ON . TO `smartms`@`%` IDENTIFIED BY PASSWORD '*E6CC90B878B948C35E92B003C792C46C58C4AF40' WITH GRANT OPTION |
GRANT SELECT ON `mysql`.`roles_mapping` TO `smartms`@`%` |
GRANT SELECT ON `mysql`.`db` TO `smartms`@`%` |
GRANT SELECT ON `mysql`.`user` TO `smartms`@`%` |
GRANT SELECT ON `mysql`.`tables_priv` TO `smartms`@`%` |
GRANT SELECT, INSERT, UPDATE, CREATE ON `mysql`.`maxscale_config` TO `smartms`@`%` |
-----------------------------------------------------------------------------------------------------------------------------------
6 rows in set (0.000 sec)
=================================
And this is about the Monitor conf
[master]
type=monitor
module= mariadbmon
servers=primary0,secondary0,secondary1
user=smartms
password=*******
#disk_space_check_interval=1000
#disk_space_threshold=/:85
detect_replication_lag=true
enforce_read_only_slaves=true
failcount=3
auto_failover=1
auto_rejoin=true
monitor_interval=300
=========================
I am using such a configuration now, why does maxscale not automatically create mysql.maxscale_config
My maxscale is deployed in kubernetes, the final problem I want to solve is: the login permission problem when logging in to multiple maxscale admin gui in the backend through slb, thank you
Does /var/log/maxscale/maxscale.log contain any error messages? The permissions seem correct and it should create the table automatically when it connects to the cluster.
I don't see the log file in the / var / log / maxscale directory, but I see the following error log on the pod console:
2022-05-23 14:17:55 warning: The 'log_debug' option has no effect in release mode.
2022-05-23 14:17:55 notice : The logging of debug messages has been enabled.
2022-05-23 14:17:55 notice : The logging of info messages has been disabled.
Configuration file : /etc/maxscale.cnf
Log directory : /var/log/maxscale
Data directory : /var/lib/maxscale
Module directory : /usr/lib64/maxscale
Service cache : /var/cache/maxscale
2022-05-23 14:17:55 warning: Multi-line parameters have been deprecated. Declare the value for 'log_debug' on one line.
2022-05-23 14:17:55 warning: Parameter 'detect_replication_lag' for module 'master' is deprecated and will be ignored.
2022-05-23 14:17:55 warning: causal_reads_timeout: Specifying durations without a suffix denoting the unit has been deprecated and will be removed in Maxscale 2.7.0: 10. Use the suffixes 'h' (hour), 'm' (minute) 's' (second) or 'ms' (milliseconds).
2022-05-23 14:17:55 warning: max_slave_replication_lag: Specifying durations without a suffix denoting the unit has been deprecated and will be removed in Maxscale 2.7.0: 3. Use the suffixes 'h' (hour), 'm' (minute) 's' (second) or 'ms' (milliseconds).
2022-05-23 14:18:00 error : (rw-listener); Write to Client DCB ::ffff:100.116.242.0 in state DCB::State::POLLING failed: 104, Connection reset by peer
2022-05-23 14:18:01 error : (rw-listener); Write to Client DCB ::ffff:100.116.152.130 in state DCB::State::POLLING failed: 104, Connection reset by peer
=================================
However, these error logs exist because my SLB has enabled health check, which has nothing to do with GUI login
The GUI starts with the default credentials admin with the password mariadb. Does the login to the GUI work with these? If not, have you created other users that you use with maxctrl?
When I use a single pod to allow maxscale GUI, I can log in successfully. When I use multiple pods in SLB mode, it will appear 401 error
All users use admin / MariaDB. I have also tried to use users created by myself. The phenomenon is the same
Do you load balance the requests to the GUI? If so, you must route the same GUI requests to the same Maxscale or create the same users on all Maxscale instances. The GUI authentication token from one MaxScale cannot be used with another MaxScale.
Yes, so I want to configure config_ sync_ Cluster, and I use the default user here. All maxscales have the same user and password
If you have a load balancer in front of MaxScale, you need to make it so that the requests from the same client IP are sent to the same MaxScale.
aroma Could you please write the bug-report in English. Unfortunately nobody here can read Chinese.
Johan