zoukankan      html  css  js  c++  java
  • Redis相关

    进入到redis的所在目录后,启动redis,redis-cli.exe  -h 127.0.0.1  - 6379  在客户端运行,出现

    Redis (error) NOAUTH Authentication required的解决方法

    是因为在conf文件的 SECURITY下  requirepass root设置了密码,在登录时要求

    登录验证。

    linux 安装的mysql 5.7 ,一个方法有事务,其方法实现是两句话:
    第一句 delete from  tb_resources_role where  R_ID=?
    第二句 INSERT INTO tb_resources_role....  

    问题是,第一句执行完,第二句一直卡在那里,提示java.sql.BatchUpdateException: Lock wait timeout exceeded; try restarting transaction  
    那么我的mysql数据库 需要如何配置 ?

    原因是高版的默认事务为 REPEATABLE-READ ,就会造成这种情况
    解决方案为,把事务修改为Oracle采用的事务隔离级别Read Committed:
    两个办法:
    1、  set global transaction isolation level repeatable read;  
    2、或者修改 mysql.ini配置文件,在最后加上:
    #可选参数有:READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, SERIALIZABLE.
    [mysqld]
    transaction-isolation = READ-COMMITTED

  • 相关阅读:
    [spring] SpEL
    [spring学习2] 装配
    [spring] proxyMode
    [spring] @PropertySource
    [一些问题] 在vscode中添加jar库
    [spring] ApplicationContext相关问题
    gradle 打包
    [spring学习1] IoC容器
    spring快速开始
    准备要写的笔记备忘录
  • 原文地址:https://www.cnblogs.com/smailpeanut/p/7243008.html
Copyright © 2011-2022 走看看