Signup
DATABASE PROGRAMMING AND ADMINISTRATION FORUM
Top Web Hosts >> Forums >> Database Programming and Administration

   
  MySQL DB Replication: Slave having problem starting Slave I/O thread.
  Name : aladar     Date : 07-07-03 12:21     Hit : 5023    
  Trackback : http://www.topwebhosts.org/bbs/tb.php/database/17
I've setup MySQL db replication, and started both master and slave but synchronization does not work. Looking at the /var/log/mysqld.log on the slave machine shows the following error messages:

070703 11:55:25 [ERROR] Slave I/O thread exiting, read up to log 'mysql-bin', po
sition 79
070703 11:57:45 [ERROR] Error reading relay log event: slave SQL thread was kill
ed
070703 11:59:45 [Note] Slave SQL thread initialized, starting replication in log
 'mysql-bin.000001' at position 4190, relay log './web2-relay-bin.000001' positi
on: 4
070703 11:59:46 [Note] Slave I/O thread: connected to master 'slave@74.205.60.14
6:3306',  replication started in log 'mysql-bin.000001' at position 4190

The "show slave status" command shows the following values:
Slave_IO_State: [none]
Slave_IO_Running: No
Slave_SQL_Running: yes

Any insight into fixing this problem?  Thanks.

admin   07-07-03 12:28
Try this:

On master, type:
mysql> show master status;
+------------------+----------+--------------+------------------+
| File            | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 |    4190 |              |                  |
+------------------+----------+--------------+------------------+

Make note of this output, as we'll have to use those values to setup slave.

On Slave, type
mysql> stop slave;
mysql> flush tables with read lock;
mysql> unlocktables;
mysql> change master to master_log_file='{output from master}';  (i.e. mysql-bin.000001)
mysql> change master to master_log_pos='{output from master}'; (i.e. 4190)
mysql> start slave;
   

 


Cheap Web HostingBudget Web HostingEcommerce Web Hosting
Link to UsLink ExchangeAdvertisePrivacy PolicyTerms Of ServiceAbout UsContact UsSitemap
Copyright © 2006 - 2013 Broadband Media, Inc. All rights reserved.