zoukankan      html  css  js  c++  java
  • Global Variables

    Global Variables

    我们可以通过global variables来调整ProxySQL的功能,有如下两种方式来调整global variables:

    • at runtime, using the admin interface (preferred)
    • at startup, using the dedicated section in the configuration file

    ProxySQL在运行的过程中,大多数参数是可以修改的而且可以立即生效,并不需要重启后台进程,但是mysql-threads 、 mysql-stacksize这两个参数除外

    有两种类型的global variables,这可以通过变量的前缀来区分它们各自的功能

    • admin variables, which control the behaviour of the admin interface. Their names begin with the token "admin-"
    • mysql variables, which control the MySQL functionality of the proxy. Their names begin with the token "mysql-"

    当这些global variables被频繁的访问的话,为了快速访问这些global variables,每一个proxy线程的内部都会保存这些global variables,它们通过内存跟踪或者连接数来控制proxy的具体行为。

    不管何时执行了LOAD MYSQL VARIABLES TO RUNTIME or LOAD ADMIN VARIABLES TO RUNTIME命令,所有用到mysql或者admin variables的线程都会要求变更相应的variables。

    可以通过update语句改变global variable的值

    UPDATE global_variables SET variable_value=1900 WHERE variable_name='admin-refresh_interval';

    或者也可以用类似于简写的MySQL SET语句

    SET admin-refresh_interval = 1700;
    SET admin-version = '1.1.1beta8';

    变量的具体含义,参考文档

    admin-web配置

    MySQL Variables

    注意字符集设置

    mysql-default_charset

    我设置成utf8mb4,通过proxy 6033连接后端服务器后,client以及connect字符集均没有变成utf8mb4

    参考文档:global variables

  • 相关阅读:
    lambda表达式
    C#_单例模式
    Authorize的Forms认证
    10. windows下原来可以这样隐藏webshell
    8. php回调后门
    7. 编辑器漏洞整理
    6. webshell文件上传分析溯源
    1.5 webshell文件上传漏洞分析溯源(1~4)
    1.4 DVWA亲测文件上传漏洞
    1.3 任意文件查看与下载漏洞
  • 原文地址:https://www.cnblogs.com/geek-ace/p/9553965.html
Copyright © 2011-2022 走看看