MySQL Replication - change replica iP
Hi,
The database is MySQL version 8.4.6
There is source and target database (the replica).
The replica will be relocated to different building and location, and will be using new IP. The question:
a) what is needed to be done before shutting down the replica database.
b) what is needed to be done after the restart of the replica database.
On the source / production database and on the replica database.
I have experience in Oracle/Data Guard but could use some tips. This will be a new database (for me) and a one off thing, so additional queries about getting info/setting would be helpful too.
Is it true that this is the only thing needed to be done?
-- Remove old grant
REVOKE REPLICATION SLAVE ON *.* FROM 'repl_user'@'old_ip';
-- Add new grant
GRANT REPLICATION SLAVE ON *.* TO 'repl_user'@'new_ip' IDENTIFIED BY 'your_password';
FLUSH PRIVILEGES;
Also, since for NySQL IP for users to access from is stored, is this something I need to take into account in case of future "swing" (from source to replica) so this is also what needed to be updated?
Thanks.
Subject
Views
Written By
Posted
MySQL Replication - change replica iP
295
October 10, 2025 02:21AM
Sorry, only registered users may post in this forum.
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.