I have one master and about 10 slave servers. Time to time one (absolutely random) slave server lost replication connection. When i type slave stop; slave start; i see "ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log"
When i look at /var/log/mysql.log, i see
[ERROR] Failed to open the relay log '/var/run/mysqld/mysqld-relay-bin.000759'
080617 12:25:45 [ERROR] Could not find target log during relay log initialization
OK, "slave reset", drop databases , set MASTER etc, slave start - and replication does just fine. without any errors. Until the next time.
I add to my.cnf next lines:
max-relay-log-size=1M
max-binlog-size=2M
relay-log=/var/run/mysqld/mysqld-relay-b
But without any effect: replication may work fine long time or break at next hour.
Question: how can set replication, that always work ? :)
Platform: Linux Fedora 6 & 7, mysql 5.0.45, no any errors about disk or memory. Size of replication tables - about 1-2Mb
June 17 2008, 13:39:03 UTC 3 years ago
In my experience it happened only when server got rebooted and opened relay log file was messed up.
June 17 2008, 14:42:47 UTC 3 years ago
June 17 2008, 14:53:28 UTC 3 years ago
если хочешь кучу бесплатных/бесполезных советов, спроси на sql.ru в форуме mysql ;)
Anonymous
November 26 2008, 06:45:03 UTC 3 years ago
Can't you restart it?
You should be able to just restart replication using the data in master.info. Check out this post for the exact commands:http://blog.bit-matrix.com/2008/11/19/my
May 20 2010, 10:58:19 UTC 2 years ago
"Could not initialize master info structure" when trying to set the master
I had a related problem to this, except I was getting:ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log
in response to the command:
mysql> change master to master_host='192.168.0.2', master_user='####', master_password='####', master_log_file='master-bin.002557', master_log_pos=320489201;
All that was in the error log was
100519 11:05:13 [ERROR] Error reading master configuration
which didn't exactly help!
Turned out the actual problem was that the binary log index file on the slave contained references to files that no longer existed on the slave.
The solution was to do
updatedb
locate slave-relay-*
and then to edit the file
/var/lib/mysql/slave-relay-bin.index
and remove all lines referring to files that didn't show up in the locate results. Note find could have been used instead of updatedb and locate.
After that it was possible to set the master on the slave without any errors appearing, and restart replication.
(note the actual names of the servers have been replaced with "master" and "slave" above)
June 9 2010, 12:10:35 UTC 1 year ago
Mysql
Hi, I had the same error with configuring the master. In fact, I have never been able to configure replication to start at all, can you please post a step by step note or MY.CNF files for me? would greatly appreaciate, I am using a Fedora 10 machine (mysql Ver 14.14 Distrib 5.1.47) and Mandriva 2010 (ver 14.14 Distrib 5.1.42), please helpJune 9 2010, 12:32:19 UTC 1 year ago
Re: Mysql
Now i find only one solution: Drop all data, etc, and restart replication from "zero point". I even set the simple script for that likeslave stop;
delete ...
drop ..
set ...
slave start;
command all from mysql manual from "replication" section.
other solutions does not help for me.
Anonymous
December 31 2010, 18:19:03 UTC 1 year ago
Re: Mysql
flush slave;change master to....
is the solution you all looked for...
Anonymous
January 28 2011, 07:51:54 UTC 1 year ago
Порно
Смотреть порно (http://megafreeporn.ru/)