1
ice2016 2021-09-16 13:59:36 +08:00
贴 log
|
2
moell OP @ice2016 不好意思,现在看是有错误日志的。我尝试过从 bin_log 文件的第一个位置开始同步,和最新的主库的位置开始同步都没成功 。
[Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=localhost-relay-bin' to avoid this problem. [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [ERROR] Slave I/O for channel '': error connecting to master '' - retry-time: 60 retries: 1, Error_code: 2003 [Warning] Slave SQL for channel '': If a crash happens this configuration does not guarantee that the relay log info will be consistent, Error_code: 0 [Note] Slave SQL thread for channel '' initialized, starting replication in log 'bin_log13.000001' at position 23289168, relay log './localhost-relay-bin.000004' position: 101377 [Note] Event Scheduler: Loaded 0 events [Note] /usr/local/mysql/bin/mysqld: ready for connections. |
3
dot2017 2021-09-16 14:42:51 +08:00
主要问题:error connecting to master 从连不上主。检查端口和防火墙
次要问题:1. 同步参数不对,--relay-log 参数检查下 2. 主从的用户名密码直接写配置里了?不关心安全就无所谓了 3. 现在主从位置已经错乱了,等你网络通了,把主库完整覆盖到从库,再起同步 |
4
moell OP @dot2017 谢谢,网络应该没问题,如刚网络有问题的话,show slave status 应该会显示吧。次要问题.3 中, 是不是我现在就只有用 mysqldump 类似工具,导入到从库然后再起同步了。
|
5
dot2017 2021-09-16 14:53:51 +08:00
|