Skip to Content

Switch the IP of Master/slave installation

How to switch the IP of Master/Slave installation ?

1.To switch IP of the master/slave installation, You should log in to the billing portal, edit your license, and change the IP to your new IP.

Login to billing portal -> Licenses -> Edit -> update

2. Upon changing the IP, proceed to upgrade your Ezeelogin on the Master node. If your current Ezeelogin version is not the latest,  download the latest version from the billing portal based on your PHP version.

If you are already on latest version, you can upgrade to the same version itself.

3. Run the following command to upgrade your Master node after downloading the package. Replace dbspass with MySQL root password

root@primary_gateway:~$ sh ezlogin_7.36.0_php81.bin -- -dbsuser root -dbspass <enter-_(root)db_password> -auto -force -ACCEPT_SETTINGS -I_ACCEPT_EULA -update

4. Run the following command on your master node after upgrade

root@primary_gateway:~$ php /usr/local/ezlogin/grant_host.php <new_ip_address of secondary node/slave>

5. Download the same version of Ezeelogin on the Slave node as master node. After downloading run the following command to update the secondary with a new IP address.

root@secondary:~$ sh ezlogin_7.36.0_php81.bin -- -secondary <ip_adress of the slave node> -othernode <ip_address of master node> -update -auto -force -ACCEPT_SETTINGS -I_ACCEPT_EULA 

How to switch the IPs from public to private in a master/slave installation?

You can  connect master and slave using both public and private IPs. Since private IP is generally faster  than public IP, you can switch to the private IP.

Follow below steps if you want to switch the IPs from public to private IPs.

1. Upgrade your Ezeelogin on the Master node, If you are not on the latest version of Ezeelogin.Download the latest version corresponding to your PHP version from your billig portal.

Run the following command to upgrade your Master node after downloading the package.Replace dbspass with MySQL root password

root@primary_gateway:~$ sh ezlogin_7.36.0_php81.bin -- -dbsuser root -dbspass <enter-_(root)db_password> -auto -force -ACCEPT_SETTINGS -I_ACCEPT_EULA -update

2. Run the following command on your master node after upgrade.

root@primary_gateway:~$ php /usr/local/ezlogin/grant_host.php <Private_ip_address of secondary node/slave>

3. Download the same version of Ezeelogin on the Slave node as master node. After downloading run the following command to update the secondary with  a Private IP address.

root@secondary:~$ sh ezlogin_7.36.0_php81.bin -- -secondary <private_ip_adress of the slave node> -othernode <private_ip_address of master node> -update -auto -force -ACCEPT_SETTINGS -I_ACCEPT_EULA