problem with replication

  • Filter
  • Time
  • Show
Clear All
new posts

  • problem with replication

    I have been following the tutorial [URL="http://www.percona.com/doc/percona-xtrabackup/howtos/setting_up_replication.html"]http://www.percona.com/doc/percona-xtrabackup/howtos/setting_up_replication.html[/URL="http://www.percona.com/doc/percona-xtrabackup/howtos/setting_up_replication.html"] to set up database replication. I am running two centos 5 vm's with Percona-Server-server/client 51.



    datadir = /var/lib/mysql

    server-id = 2

    log-bin = /var/lib/mysql/mysql-bin.log

    max_binlog_size = 104857600

    Everything works fine up until the point I replace the slave mysql dir with the snapshot of the masters after which mysql won't start. All my log is showing me is:

    130513 09:54:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

    130513 09:54:13 mysqld_safe mysqld from pid file /var/lib/mysql/vagrant-slave.pid ended

    If I swap back to the slaves original mysql dir mysql starts fine.

    Any help greatly appreciated


  • #2
    Do you mean that you are emptying the data dir on the slave, and loading the snapshot from the master into that directory? If so, make sure you prepared the backup properly using --apply-log, that the file ownership is set correctly (i.e. owned by mysql) on the data dir and contents, and if you have something like AppArmor or SELinux enabled make sure that the permissions for those are set correctly.