mysql master > slave

Discussion in 'Server Operation' started by ants, Sep 8, 2010.

  1. ants

    ants New Member

    I followed the tutorial at
    pretty much word for word.

    Then when I get to the part where I run
    I never get anything returned. Have have been trying to set up replication in side a couple of vmware images before I run it on the real production servers. For the life of me I can not figure out what I am doing wrong. I simply get zero rows returned when I run
    Also I would rather replicate only one table instead of the whole database. Is that possible, and how would that be accomplished. I had trouble finding any information on how to accomplish replicating only one table in the database.
  2. falko

    falko Super Moderator ISPConfig Developer

    Are there any MySQL errors in your logs?
  3. ants

    ants New Member


    There is nothing in the mysql logs.

    I double checked that the slave_user has the correct permissions in the mysql database user table to do replication.

    The required entries are in /etc/mysql/my.cnf

    Some stuff works as expected, like turning on ssl and certificate locaitons
    But I can not get "SHOW MASTER STATUS;" to work.

  4. falko

    falko Super Moderator ISPConfig Developer

    Can you post your /etc/mysql/my.cnf?
  5. ants

    ants New Member

    the my.cnf

    The /etc/mysql/my.cnf

    Not much was changed, only the ssl certificates and the replication.

  6. falko

    falko Super Moderator ISPConfig Developer

    You need
    server-id               = 1
    log_bin                 = /var/log/mysql/mysql-bin.log
    expire_logs_days        = 10
    max_binlog_size         = 100M
    binlog_do_db            = exampledb
    in the [mysqld] section, not in [MYSQL_CLUSTER].
  7. ants

    ants New Member

    [mysqld] secontion, replicate only one table?

    That was the trick that I needed

    I did not realize that sections matter. Most of the time when editing config files it does not really matter where in the file it is as long as the right syntax accompanies it.

    Is it possible to only replicate only one table from the database? How would I accomplish replicating only one table, so I can write to the rest.
  8. falko

    falko Super Moderator ISPConfig Developer

    You can do it as follows:

    replicate-do-db = yourdb
    Add replicate-ignore-table lines for all tables that you don't want to replicate.

Share This Page