Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-4144

Where to get maxscale 6 mysql.maxscale_config table source sql

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 6.3.1
    • N/A
    • N/A
    • 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

          aroma lee created issue -
          johan.wikman Johan Wikman added a comment -

          aroma Could you please write the bug-report in English. Unfortunately nobody here can read Chinese.

          Johan

          johan.wikman Johan Wikman added a comment - aroma Could you please write the bug-report in English. Unfortunately nobody here can read Chinese. Johan
          markus makela markus makela added a comment -

          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

          markus makela markus makela added a comment - 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
          markus makela markus makela made changes -
          Field Original Value New Value
          Assignee markus makela [ <markus.makela ]
          markus makela markus makela added a comment -

          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

          markus makela markus makela added a comment - 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
          markus makela markus makela added a comment - - edited

          Can you add the output of the following query?

          SHOW GRANTS FOR smartms
          

          markus makela markus makela added a comment - - edited Can you add the output of the following query? SHOW GRANTS FOR smartms
          aroma lee added a comment -

          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

          aroma lee added a comment - 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
          aroma lee made changes -
          Summary maxscale 6 mysql.maxscale_config table source sql 在哪里获取呢 Where to get maxscale 6 mysql.maxscale_config table source sql
          aroma lee added a comment -

          When I visit this maxscale admin gui slb ip the chrome console shows 401

          aroma lee added a comment - When I visit this maxscale admin gui slb ip the chrome console shows 401
          aroma lee made changes -
          Attachment 401.png [ 63845 ]
          markus makela markus makela added a comment -

          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.

          markus makela markus makela added a comment - 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.
          aroma lee added a comment - - edited

          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

          aroma lee added a comment - - edited 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
          markus makela markus makela added a comment - - edited

          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?

          markus makela markus makela added a comment - - edited 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 ?
          aroma lee added a comment -

          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

          aroma lee added a comment - 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
          markus makela markus makela added a comment -

          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.

          markus makela markus makela added a comment - 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.
          aroma lee added a comment -

          Yes, so I want to configure config_ sync_ Cluster, and I use the default user here. All maxscales have the same user and password

          aroma lee added a comment - Yes, so I want to configure config_ sync_ Cluster, and I use the default user here. All maxscales have the same user and password
          markus makela markus makela added a comment -

          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.

          markus makela markus makela added a comment - 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 lee added a comment -

          Thank you very much ,I turn on the keep session of SLB and it works normally

          aroma lee added a comment - Thank you very much ,I turn on the keep session of SLB and it works normally
          markus makela markus makela added a comment -

          OK, that's good to hear. Can we close this bug?

          markus makela markus makela added a comment - OK, that's good to hear. Can we close this bug?
          aroma lee added a comment -

          YES,Thanks

          aroma lee added a comment - YES,Thanks
          markus makela markus makela made changes -
          Component/s N/A [ 13517 ]
          Fix Version/s N/A [ 22001 ]
          Resolution Not a Bug [ 6 ]
          Status Open [ 1 ] Closed [ 6 ]

          People

            markus makela markus makela
            aroma lee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.