ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log hatası

MySQL’de replikasyon yaptığım slave sunucuda bazı işlemler yapmam gerekti. Sonrasında;

mysql> CHANGE MASTER TO MASTER_HOST='xx.xx.xx.xx', MASTER_USER='slave_user' ,MASTER_PASSWORD='xxx'   ,MASTER_LOG_FILE='mysql-bin.001788' ,MASTER_LOG_POS=549864673;
ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log

hatasını aldım.

Tabii ki yapmak gereken çok basit

mysql> flush slave;
Query OK, 0 rows affected (0.00 sec)

sonrasında problemsiz devam edebilirsiniz.

Posted in Linux, MySQL on June 22nd, 2012 by Kürşad DARA | | 0 Comments

Got fatal error 1236 from master when reading data from binary log: ‘Could not find first log file name in binary log index file’ hatası

mysql slave sunucu da show slave status dediğinizde aşağıdaki hatayı alıyorsanız :

Last_IO_Errno: 1236
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’

Öncelikle slave sunucu da

stop slave;

sonrasında master sunucu da

mysql> flush logs;
mysql> show master status;
+------------------+----------+--------------+------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000005 |     106  |              |                  | 
+------------------+----------+--------------+------------------+

Buradan log file ismini ve position alıp daha sonra

slave sunucu da

mysql> CHANGE MASTER TO MASTER_LOG_FILE=’mysql-bin.000005′, MASTER_LOG_POS=106;
mysql> start slave;

bu kadar.

Posted in Linux, MySQL on April 13th, 2012 by Kürşad DARA | | 0 Comments