zoukankan      html  css  js  c++  java
  • mysql报错

    1、无论在mysql中执行什么语句,都会报以下错误:

    You must reset your password using ALTER USER statement before executing this statement.

    在网上找了一下原因,看到以下信息

    这就是因为数据库的这个默认的default_password_lifetime参数导致的

    在数据库中执行select version(),显示我的版本是5.7.25,default_password_lifetime就该是0,查询之后果然是

    这个时候,我们需要更改密码就好了:

    mysql>alter user user() identified by "yourpasswd";

    然后再执行你需要的语句就没有问题了。

    2、在mysql导入数据时,报错信息如下:

    Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again

    提示很明白了,是要求的缓存比设置的参数多,让增加max_binlog_cache_size这个参数并重试,那我们就修改一下参数吧

    打开mysql的配置文件/etc/my.cnf ,找到max_binlog_cache_size,将参数设置得大一点(我以前是512M,现在修改成1024M),保存之后重启,重新导入数据就不会报错了。

    3、在mysql导入数据时,报错信息如下:

    error 1534  (HY000): writing one row to the row-based binary log failed

    这是因为内存不足导致的binlog cache size不够不能写入binlog,导致语句无法执行

    在配置文件中调整binlog_cache_size和max_binlog_cache_size参数的值,改大一点

    binlog_cache_size = 128M
    max_binlog_cache_size = 512M 

  • 相关阅读:
    error: with modifiers "public "
    移除元素
    删除有序数组中的重复项
    最长公共前缀
    如何杀死window进程
    IDEA卡顿问题
    合并两个有序链表
    开闭原则
    字符集和sql语句GROUPBY查询的版本问题
    里氏替换原则
  • 原文地址:https://www.cnblogs.com/Christine-ting/p/10528613.html
Copyright © 2011-2022 走看看