zoukankan      html  css  js  c++  java
  • mysql / mysqld_safe / mysqld 常见错误处理

    1. FATAL ERROR: Could not find ./bin/my_print_defaults

    [root@localhost scripts]# ./mysql_install_db  --user=mysql --datadir=/var/lib/mysql
    FATAL ERROR: Could not find ./bin/my_print_defaults
    
    If you compiled from source, you need to run 'make install' to
    copy the software into the correct location ready for operation.
    
    If you are using a binary release, you must either be at the top
    level of the extracted archive, or pass the --basedir option
    pointing to that location.

    解决方法:

    [root@localhost scripts]# ./mysql_install_db  --user=mysql --datadir=/var/lib/mysql --basedir=/usr/local/mysql

    指定 --basedir

    2. ERROR 1665 (HY000)

    (root@localhost)[t]mysql>insert into t(i) values(5);
    ERROR 1665 (HY000): Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT 
    and at least one table uses a storage engine limited to row-based logging.
    InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.

    RC隔离级别时,binary log的格式只能使用 row based logging。不能使用 statement 格式的个binary log。

    5.6.15-log 版本的还是可以的:RC隔离级别可以设置 binlog_format=statement;

    但是在5.6.26-log 版本测试,RC隔离级别不能设置binlog_format=statement; 只能使用 binlog_format=row;

    不知道具体从哪个版本开始不允许的。

    3. mysqlbinlog 报错 ERROR: Error in Log_event::read_log_event(): 'Sanity check failed':

    [root@localhost ~]# mysqlbinlog /backup/xtrabackup/mysql-bin.000002 --start-position=482 > bin.sql
    ERROR: Error in Log_event::read_log_event(): 'Sanity check failed', data_len: 65, event_type: 32
    ERROR: Could not read entry at offset 592: Error in log format or read error.
    

    mysqlbinlog 调用的版本错了,默认调用的是系统中libmyqlclient中的了,和最新版的binlog不兼容,解决办法指定mysqlbinlog目录:

    [root@localhost ~]# /usr/local/mysql/bin/mysqlbinlog /backup/xtrabackup/mysql-bin.000002 --start-position=482 > bin.sql
    [root@localhost ~]#

    执行成功了。

  • 相关阅读:
    exiting pxe rom 无法启动
    nginx 动静分离
    tomcat apr 部署
    zabbix_agentd.conf配置文件详解
    Zabbix点滴记录
    zabbix监控haproxy
    Zabbix使用Omsa来监控Dell服务器的硬件状态
    Zabbix监控Zookeeper健康状况
    Redis 多数据库
    Zabbix实现自动发现端口并监控
  • 原文地址:https://www.cnblogs.com/digdeep/p/4908353.html
Copyright © 2011-2022 走看看