Restarting MYSQL Instances and Servers

Restarting MYSQL Instances and Servers

 

Environment:-

MySQL Database Instances running in two separate Windows Servers namely PROD (172.21.50.162) and DR (10.218.86.8). They have been setup as Source (PROD) and Replica (DR) using the MySQL native replication configuration which are in-sync.

 

Restarting the MYSQL Databases (DR Server).

  1. Login to the DR (10.218.86.8) environment.
  2. Start the MYSQL workbench
  3. Connect to the server using the root user and password.
  4. In the SQL Tab run the following command:-

 

Use this command to check the status of the slave server at the moment and verify the following screenshots having the same value.

  1. Show slave status;

Using the following command you will stop the replication of the database which will act as a pre-req.

  1. stop slave;

Enter the shutdown command to stop the MYSQL services.

  1. Shutdown

Once the command is completed successfully verify the services are stopped from ‘services.msc’

                                                        Also please confirm that ‘Startup Type’ is set to manual.

 

  1. Now restart the Windows server for security updates.

Note:-

Do NOT start the DR MYSQL services at this stage.

 

Restarting the MYSQL Databases (Production Server).

  1. Login to the Production (172.21.50.162) environment.
  2. Start the MYSQL workbench
  3. Connect to the server using the root user and password.
  4. In the SQL Tab run the following commands:-

 

Use this command to check the status of the master server at the moment and also please note down the master status within a notepad.

  1. Show master status;

Enter the shutdown command to stop the MYSQL services.

  1. Shutdown

Once the command get’s completed successfully verify the services are stopped from ‘services.msc’

           Also please confirm that ‘Startup Type’ is set to manual.

 

  1. Now restart the Windows server for security updates.

 

  1. Start the MYSQL services using ‘services.msc’.
  2. Once started take again the master status using the following command and note down the output again.

 

  1. Show master status.

 

Starting the DR server services back online.

  1. Login to the DR (10.218.86.8) environment.
  2. Navigate to ‘services.msc’ and start the slave database manually.

 

  1. Start the MYSQL workbench
  2. Connect to the server using the root user and password.
  3. In the SQL Tab run the following command:-

 

Use this command to check the status of the slave server at the moment and verify the following screenshots having the same value.

  1. Show slave status;

 

 

 

    About Abdul Khalique Siddique

    In addition to my proficiency in Oracle Database, I have also specialized in Oracle E-Business Suite. I have hands-on experience in implementing, configuring, and maintaining EBS applications, enabling organizations to streamline their business processes and achieve operational efficiency. Also I have hands-on experience in Oracle Cloud Infrastructure (OCI). I have worked with OCI services such as compute, storage, networking, and database offerings, leveraging the power of the cloud to deliver scalable and cost-effective solutions. My knowledge of OCI architecture and deployment models allows me to design and implement robust and secure cloud environments for various business requirements. Furthermore, I have specialized in disaster recovery solutions for Oracle technologies. I have designed and implemented comprehensive disaster recovery strategies, including backup and recovery procedures, standby databases, and high availability configurations. My expertise in data replication, failover mechanisms, and business continuity planning ensures that organizations can quickly recover from disruptions and maintain uninterrupted operations.