zoukankan      html  css  js  c++  java
  • mysql 全局变量和SESSION变量

    mysql> SET query_cache_size = 40000;
    ERROR 1229 (HY000): Variable 'query_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
    
    
    mysql> show variables like '%commit%';
    +--------------------------------+-------+
    | Variable_name                  | Value |
    +--------------------------------+-------+
    | autocommit                     | ON    |
    | binlog_order_commits           | ON    |
    | innodb_api_bk_commit_interval  | 5     |
    | innodb_commit_concurrency      | 0     |
    | innodb_flush_log_at_trx_commit | 1     |
    +--------------------------------+-------+
    5 rows in set (0.01 sec)
    
    mysql> set autocommit=0;
    Query OK, 0 rows affected (0.00 sec)
    
    mysql>  show variables like '%commit%';
    +--------------------------------+-------+
    | Variable_name                  | Value |
    +--------------------------------+-------+
    | autocommit                     | OFF   |
    | binlog_order_commits           | ON    |
    | innodb_api_bk_commit_interval  | 5     |
    | innodb_commit_concurrency      | 0     |
    | innodb_flush_log_at_trx_commit | 1     |
    +--------------------------------+-------+
    5 rows in set (0.01 sec)
    
    mysql> quit
    Bye
    You have new mail in /var/spool/mail/root
    test:/root# mysql -uroot -p'kjk123' 
    
    
    mysql>  show variables like '%commit%';
    +--------------------------------+-------+
    | Variable_name                  | Value |
    +--------------------------------+-------+
    | autocommit                     | ON    |

  • 相关阅读:
    jvm的方法栈在干什么
    时间段交集查询
    linux 设置静态ip配置
    elk 学习
    内网穿透 https:natapp.cn
    mysql当前时间,日期转换,日期格式化
    swaggerui api.docs
    linux java -jar 后台进程
    druid 数据源 sql控制台输出
    spring pointcut 表达式
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13351403.html
Copyright © 2011-2022 走看看