Examples of MysqlReplicationConn


Examples of com.mysql.jdbc.MysqlReplicationConn

    final Properties info = new Properties();
    info.put("user", "root");
    info.put("password", "asdf1234");
    info.put("database", "test");

    final MysqlReplicationConn conn = new MysqlReplicationConn("localhost",
        3306, info);
    conn.setBinlogFilename("mysql-bin.000001");
    conn.setBinlogStartPos(106);
    conn.setSlaveId(127);

    conn.startReplicaCommand();

    while (true) {
      final LogEvent event = conn.getNext();
      System.out.println(event);
      if (event == LogEvent.ENUM_END_EVENT) {
        break;
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.