MySQL Forums
Forum List  »  Spanish

Re: Error con servidor maestro y esclavo
Posted by: Jesús Uzcanga
Date: March 13, 2014 02:11PM

Luis, creo que te faltan variables:

Un ejemplo de uno de mis slaves

server-id = 32
master-host = 192.168.1.5
master-port = 3306
master-user = userreplica
master-password = passwordreplica
master-connect-retry = 10
innodb-safe-binlog
sync_binlog=1


Adicionalmente debes crear un usuario que sea exclusivo para la replicación y asignarlo los prmisos específicos de replicar datos, algo como:

mysql> CREATE USER 'repl'@'%' IDENTIFIED BY 'slavepass';
mysql> GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%';


Para más info sobre este usuario busca GRANT REPLICATION SLAVE en google.


Adicionalmente antes de iniciar la replicación, debes pasarle algo similar a esto (con tus datos) al slave


mysql> CHANGE MASTER TO
MASTER_HOST='192.168.1.5',
MASTER_USER='userreplica',
MASTER_PASSWORD='passwordreplica',
MASTER_PORT=3306,
MASTER_LOG_FILE='servidorlinux-bin.000063',
MASTER_LOG_POS=74015306;


NOTA: Los 2 últimos datos (FILE y POS) los debes obtener en el master (SHOW MASTER STATUS;) al momento de pasar este comando.

___________________________
Ing. Jesús Alfredo Uzcanga
Twitter: @JesusUzcanga

We learn the 20% of what we HEAR,
the 50% of what we SEE,
the 80% of what we DO and
the 95% of what we TEACH.

____________________________________________________________
https://www.linkedin.com/in/jauzcanga/

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Error con servidor maestro y esclavo
956
March 13, 2014 02:11PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.