主从备份数据库报错

【在数据库主从备份中遇到的两个报错】  

(1)Last_IO_Error: error connecting to master 'repl@10.0.0.51:3306' - retry-time: 10  retries: 4

【解决方案,查看#slave向连接主库建立ms关系的账户密码配置是否有误

创建复制用户:主:mysql -uroot –pzsb123456 -e "grant replication slave on *.* to 'repl'@'10.0.0.%' identified by 'repl666';"

备:

master_user='repl',

master_password='repl666',

(2)    Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'

【解决方案】

1、主->刷新binlog,得到新的binlog,flush logs;show master status;


2、从->stop slave; 
3、change master to master_log_file='binlog.000025',master_log_pos=274;
4、从->start slave;  
5、查看结果 show slave status \G;

友情提醒,master_log_file='binlog.000025'中间不要有空格

相关推荐

  1. MySQL主从异常1872

    2023-12-26 14:18:04       36 阅读
  2. MySQL 搭建主从 1236

    2023-12-26 14:18:04       28 阅读
  3. spark写入数据

    2023-12-26 14:18:04       60 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-26 14:18:04       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-26 14:18:04       100 阅读
  3. 在Django里面运行非项目文件

    2023-12-26 14:18:04       82 阅读
  4. Python语言-面向对象

    2023-12-26 14:18:04       91 阅读

热门阅读

  1. 《微信小程序开发从入门到实战》学习六十三

    2023-12-26 14:18:04       57 阅读
  2. redis相关问题

    2023-12-26 14:18:04       49 阅读
  3. 访问者模式(Visitor)

    2023-12-26 14:18:04       56 阅读
  4. LeetCode //C - 1004. Max Consecutive Ones III

    2023-12-26 14:18:04       57 阅读