I am trying to set up a multi master mysql
replication
on two systems on a network. The two separate database servers are running mysql
at localhost
, How do I create a replication
user for the hosts
since they share the same name.
I could do this, but it doesn't seem like the right thing to do.
CREATE USER 'repl_user1'@'localhost' IDENTIFIED BY 'password1'; // Server1
CREATE USER 'repl_user2'@'localhost' IDENTIFIED BY 'password2'; // Server2
I think something like this should do
CREATE USER 'repl_user1'@'server1.com' IDENTIFIED BY 'password1'; // Server1
CREATE USER 'repl_user2'@'server2.com' IDENTIFIED BY 'password2'; // Server2
but I don't know how to give the host a name. Thanks for any help.