Monday, February 13, 2023

AZURE MYSQL:::Amazon RDS::How do I kill a process in MySQL running within Azure MYSQL or Amazon RDS?

How do I kill a process in MySQL running within Azure MYSQL or Amazon RDS?

As root, I’m trying to kill a transaction that’s locking some tables. I run

KILL 1711;

/* SQL Error (1095): You are not owner of thread 1711 */

Received above error.

Solution:

If you are using RDS MySQL you can use rds_kill() procedure or using Azure MySQL , you can use az_kill() , as the following example:

Connect to MySQL

List process:

SHOW FULL PROCESSLIST;

In my case, I want to kill the process of id 1711:

CALL mysql.rds_kill(1711);

or 

CALL mysql.az_kill(1711);

Done

Monday, February 6, 2023

MYSQL:::MY-011505 Repl Plugin group_replication reported Member was expelled from the group due to network failures changing member status to ERROR MY-011712 MY-011735

#MY-011505 Repl Plugin group_replication reported Member was expelled from the

 group due to network failures changing member status to ERROR MY-011712 MY-011735 

--Verified MISSING node ERROR node resolution#

Solution:

 cluster.rejoinInstance("loginadmin@DBCLUSTERNODEIP_1:3306")

rejoin the missing instance back to innodb cluster.

=========================================================================

MySQL Shell 8.0.20-commercial


Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates.

Other names may be trademarks of their respective owners.

Type '\help' or '\?' for help; '\quit' to exit.

 MySQL  JS > \c loginadmin@DBCLUSTERNODEIP_2:3306

Creating a session to 'loginadmin@DBCLUSTERNODEIP_2:3306'

Fetching schema names for autocompletion... Press ^C to stop.

Your MySQL connection id is 26666197

Server version: 8.0.20-commercial MySQL Enterprise Server - Commercial

No default schema selected; type \use <schema> to set one.

 MySQL  DBCLUSTERNODEIP_2:3306 ssl  JS > var cluster=dba.getCluster()

 MySQL  DBCLUSTERNODEIP_2:3306 ssl  JS > cluster.status();

{

    "clusterName": "uatcluster",

    "defaultReplicaSet": {

        "name": "default",

        "primary": "DBCLUSTERNODEIP_2:3306",

        "ssl": "REQUIRED",

        "status": "OK_NO_TOLERANCE",

        "statusText": "Cluster is NOT tolerant to any failures. 1 member is not active",

        "topology": {

            "DBCLUSTERNODEIP_1:3306": {

                "address": "DBCLUSTERNODEIP_1:3306",

                "mode": "R/O",

                "readReplicas": {},

                "role": "HA",

                "status": "(MISSING)"

            },

            "DBCLUSTERNODEIP_2:3306": {

                "address": "DBCLUSTERNODEIP_2:3306",

                "mode": "R/W",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            },

            "DBCLUSTERNODEIP_3:3306": {

                "address": "DBCLUSTERNODEIP_3:3306",

                "mode": "R/O",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            }

        },

        "topologyMode": "Single-Primary"

    },

    "groupInformationSourceMember": "DBCLUSTERNODEIP_2:3306"

}

 MySQL  DBCLUSTERNODEIP_2:3306 ssl  JS > : cluster.rejoinInstance("loginadmin@DBCLUSTERNODEIP_1:3306")

SyntaxError: Unexpected token :

 MySQL  DBCLUSTERNODEIP_2:3306 ssl  JS > cluster.rejoinInstance("loginadmin@DBCLUSTERNODEIP_1:3306")

Rejoining the instance to the InnoDB cluster. Depending on the original

problem that made the instance unavailable, the rejoin operation might not be

successful and further manual steps will be needed to fix the underlying

problem.

Please monitor the output of the rejoin operation and take necessary action if

the instance cannot rejoin.

Rejoining instance to the cluster ...

The instance 'DBCLUSTERNODEIP_1:3306' was successfully rejoined on the cluster.

 MySQL  DBCLUSTERNODEIP_2:3306 ssl  JS >

=========================================================================

Oracle::TO shutdown fastly use alter system switch log file#Fast shutdown of Oracle Database

 Oracle::TO shutdown in faster way use alter system switch log file:

SQL> alter system switch logfile;

System altered.

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>

Then release the server for any maintenance task.

ORACLE::To Take RMAN Backups before oracle patch:Windows Server#check backup status

 ORACLE::To Take RMAN Backups before oracle patch

C:\Users\cyberarkloginname>rman target sys/Password

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Sep 3 10:01:37 2022

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database (not started)

=========================================================================

run {

allocate channel ch00 type disk;

allocate channel ch01 type disk;

allocate channel ch02 type disk;

backup format 'E:\DUMPS\ORACLEBACKUPS\full_db_%t_%sp%p' filesperset 10 database plus archivelog;

release channel ch00;

release channel ch01;

release channel ch02;

allocate channel ch00 type disk;

backup format 'E:\DUMPS\ORACLEBACKUPS\cntrl_%s_%p_%t' CURRENT CONTROLFILE;

backup format 'E:\DUMPS\ORACLEBACKUPS\spfile_%s_%p_%t' spfile;

release channel ch00;

}

--TO run below if any error during backups.

crosscheck archivelog all;

delete expired archivelog all;

---TO check the on backup duration of RMAN backup

 SELECT sid, serial#, context, sofar, totalwork,

 round(sofar/totalwork*100,2) "% Complete"

 FROM v$session_longops

 WHERE opname LIKE 'RMAN%'

 AND opname NOT LIKE '%aggregate%'

 AND totalwork != 0

 AND sofar != totalwork; 

SQL>  SELECT sid, serial#, context, sofar, totalwork, round(sofar/totalwork*100,2) "% Complete" FROM v$session_longops WHERE opname LIKE 'RMAN%' AND opname NOT LIKE '%aggregate%' AND totalwork != 0 AND sofar != totalwork;

       SID    SERIAL#    CONTEXT      SOFAR  TOTALWORK % Complete

---------- ---------- ---------- ---------- ---------- ----------

       503      43163          1    1192190    4532222       26.3


SQL> /

=========================================================================

ORACLE::Steps to take care prior server startup or server shutdown or any maintenance in Oracle DATABASE SERVER

 ORACLE::Steps to take care prior server startup or server shutdown or any maintenance in Oracle DATABASE SERVER

>>SQL> select * from v$backup;

     FILE# STATUS                CHANGE# TIME          CON_ID

---------- ------------------ ---------- --------- ----------

         1 ACTIVE              392093972 30-JUN-22          1

         3 ACTIVE              392093980 30-JUN-22          1

         4 ACTIVE              392093988 30-JUN-22          1

         5 NOT ACTIVE                  0                    2

         6 NOT ACTIVE                  0                    2

         7 ACTIVE              392093996 30-JUN-22          1

         8 NOT ACTIVE                  0                    2

         9 NOT ACTIVE                  0                    3

        10 NOT ACTIVE                  0                    3

        11 NOT ACTIVE                  0                    3

        12 NOT ACTIVE                  0                    3


     FILE# STATUS                CHANGE# TIME          CON_ID

---------- ------------------ ---------- --------- ----------

        13 NOT ACTIVE                  0                    1

        14 NOT ACTIVE                  0                    1

        15 NOT ACTIVE                  0                    1

        16 NOT ACTIVE                  0                    1

        17 NOT ACTIVE                  0                    1

        18 NOT ACTIVE                  0                    1

17 rows selected.

>>If any active,then wait for it to complete.

>>Then shut immediate

SQL> alter system switch logfile;

System altered.

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>

>>Then handover server to windows team for patch or any maintenance to avoid unnecessary surprises.

Sunday, February 5, 2023

MYSQL::SQL Error(3100): Error on observer while running replication hook 'before commit' in MYSQL innodb cluster group replication.#STOP GROUP REPLICATION

 Error from application team end: SQL Error(3100): Error on observer while running replication hook 'before commit' in MYSQL innodb cluster group replication.

========================================================================

In this case, we just go to each node and run the following command to stop group replication:

Ideally, the step would be the following:

1. Execute the following command on all nodes to stop the group replication:

mysql> STOP GROUP_REPLICATION;

2. Run the following command on all nodes in the cluster:

mysql> SELECT @@GLOBAL.GTID_EXECUTED \G

Find the node that contains highest GTID set. Reference: How Do I Know Which Member To Start First In Group Replication After All Members (The Entire Group) Shutdown ( Doc ID 2232850.1 )

3.. Once you find the node that contains highest GTID set, then you could connect it to the shell and run the following command:

MySQL JS> dba.rebootClusterFromCompleteOutage()

this should bring all nodes back online.

Then, you could restart the router to fetch the latest metadata.

This should bring the nodes ONLINE if they went out of the cluster due to network issue. If it went out of the cluster due to applier thread error, then it cannot join the group until you fix the issue manually.

=================================================================

Commands executed:

mysql> STOP GROUP_REPLICATION;

Query OK, 0 rows affected (19.43 sec)

mysql> SELECT @@GLOBAL.GTID_EXECUTED \G

*************************** 1. row ***************************

@@GLOBAL.GTID_EXECUTED: 28179efb-72c5-11e4-b496-0050569242d9:1-13995703,

329fcb1a-c0dd-11eb-82b1-005056847352:1,

6a6ae23d-183f-11eb-ae83-005056846111:1-114606407:114931406-114935574,

ae4d4435-ecbc-11ea-a835-0050568415e0:1-348529,

d1f71bf8-c0dd-11eb-82b1-005056847352:1-253642653,

d9014b6b-1812-11eb-976b-005056846111:1-23

1 row in set (0.00 sec)

mysql>

@MYSQL SHELL:

MySQL Shell 8.0.20-commercial

Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates.

Other names may be trademarks of their respective owners.

Type '\help' or '\?' for help; '\quit' to exit.

 MySQL  JS > \c loginadmin@CLUSTERNODE3_IP:3306

Creating a session to 'loginadmin@CLUSTERNODE3_IP:3306'

Please provide the password for 'loginadmin@CLUSTERNODE3_IP:3306': **************

Save password for 'loginadmin@CLUSTERNODE3_IP:3306'? [Y]es/[N]o/Ne[v]er (default No):

Fetching schema names for autocompletion... Press ^C to stop.

Your MySQL connection id is 5215

Server version: 8.0.20-commercial MySQL Enterprise Server - Commercial

No default schema selected; type \use <schema> to set one.

 MySQL  CLUSTERNODE3_IP:3306 ssl  JS > var cluster =dba.getCluster();

Dba.getCluster: This function is not available through a session to a standalone instance (metadata exists, instance belongs to that metadata, but GR is not active) (RuntimeError)

 MySQL  CLUSTERNODE3_IP:3306 ssl  JS > cluster.status();

TypeError: Cannot read property 'status' of undefined

 MySQL  CLUSTERNODE3_IP:3306 ssl  JS > dba.rebootClusterFromCompleteOutage()

Restoring the default cluster from complete outage...


The instance 'CLUSTERNODE2_IP:3306' was part of the cluster configuration.

Would you like to rejoin it to the cluster? [y/N]: y


The instance 'CLUSTERNODE1_IP:3306' was part of the cluster configuration.

Would you like to rejoin it to the cluster? [y/N]: y


Disabling super_read_only mode on instance 'CLUSTERNODE3_IP:3306'.

WARNING: The member will only proceed according to its exitStateAction if auto-rejoin fails (i.e. all retry attempts are exhausted).


CLUSTERNODE3_IP:3306 was restored.

Rejoining 'CLUSTERNODE2_IP:3306' to the cluster.

Rejoining 'CLUSTERNODE1_IP:3306' to the cluster.

The cluster was successfully rebooted.


<Cluster:prodcluster>

 MySQL  CLUSTERNODE3_IP:3306 ssl  JS > cluster.status();

TypeError: Cannot read property 'status' of undefined

 MySQL  CLUSTERNODE3_IP:3306 ssl  JS > var cluster =dba.getCluster();

 MySQL  CLUSTERNODE3_IP:3306 ssl  JS > cluster.status();

{

    "clusterName": "prodcluster",

    "defaultReplicaSet": {

        "name": "default",

        "primary": "CLUSTERNODE3_IP:3306",

        "ssl": "REQUIRED",

        "status": "OK",

        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",

        "topology": {

            "CLUSTERNODE1_IP:3306": {

                "address": "CLUSTERNODE1_IP:3306",

                "mode": "R/O",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            },

            "CLUSTERNODE2_IP:3306": {

                "address": "CLUSTERNODE2_IP:3306",

                "mode": "R/O",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            },

            "CLUSTERNODE3_IP:3306": {

                "address": "CLUSTERNODE3_IP:3306",

                "mode": "R/W",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            }

        },

        "topologyMode": "Single-Primary"

    },

    "groupInformationSourceMember": "CLUSTERNODE3_IP:3306"

}

 MySQL  CLUSTERNODE3_IP:3306 ssl  JS > cluster.status();

{

    "clusterName": "prodcluster",

    "defaultReplicaSet": {

        "name": "default",

        "primary": "CLUSTERNODE3_IP:3306",

        "ssl": "REQUIRED",

        "status": "OK",

        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",

        "topology": {

            "CLUSTERNODE1_IP:3306": {

                "address": "CLUSTERNODE1_IP:3306",

                "mode": "R/O",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            },

            "CLUSTERNODE2_IP:3306": {

                "address": "CLUSTERNODE2_IP:3306",

                "mode": "R/O",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            },

            "CLUSTERNODE3_IP:3306": {

                "address": "CLUSTERNODE3_IP:3306",

                "mode": "R/W",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            }

        },

        "topologyMode": "Single-Primary"

    },

    "groupInformationSourceMember": "CLUSTERNODE3_IP:3306"

}

 MySQL  CLUSTERNODE3_IP:3306 ssl  JS >

MYSQL::TO read binary logs content by mysqlbinlog to text file#to see what query executed for auditing or issue finding by mysqlbinlog reading

 TO read binary logs content by mysqlbinlog to text file:

Working steps: @mysql 8.0.20

**Copy binary log file to some other server and then generate scripts.

--Place above binary log file to Path:C:\Program Files\MySQL\MySQL Server 8.0\bin> and try below 

 C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME-bin.007127  --base64-output=DECODE-ROWS --verbose > C:\Temp\statements_latestone.sql

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000056 > C:\Temp\statements.sql

DBSERVERNAME-bin.007127

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME-bin.007127  --base64-output=DECODE-ROWS --verbose > C:\Temp\statements_latestone.sql

--base64-output=DECODE-ROWS --verbose

C:\Program Files\MySQL\MySQL Server 8.0\bin>

##########################################################################

--Place above binary log file to Path:

C:\Program Files\MySQL\MySQL Server 8.0\bin> and try below 

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --base64-output=DECODE-ROWS --verbose  > C:\Temp\statements_latest11.sql

--To filter binary logs based on issue start time and stop time.

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --start-datetime "2022-08-30 08:13:00" --stop-datetime "2022-08-30 13:15:00" --base64-output=DECODE-ROWS --verbose  > C:\Temp\statements_latest12.sql


C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --base64-output=DECODE-ROWS -vv  > C:\Temp\statements_latest13.sql


C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --base64-output=DECODE-ROWS -vv  > C:\Temp\statements_latest13.sql


C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --start-datetime "2022-08-30 08:13:00" --stop-datetime "2022-08-30 13:15:00" --base64-output=DECODE-ROWS -vv  > C:\Temp\statements_latest14.sql


C:\Program Files\MySQL\MySQL Server 8.0\bin>

########################################################################


MYSQL::MEB Database backup restore Error #The innodb_log_file_size value 4294967296 is invalid. The backup has been taken with 1073741824.

MEB Database backup restore Error: 

ERROR: The innodb_log_file_size value 4294967296 is invalid. The backup has been taken with 1073741824.

=========================================================================

C:\Program Files\MySQL\mysql-backup-8.0.20\bin>mysqlbackup.exe --defaults-file=E:\workspace\data\my.ini --backup-image=E:\dumps\BACKUP\FULL_20211009_123244.img --backup-dir=C:\Temp\TMPDUMP --encrypt-password="DATABASENAME_Encrypti0n@3" copy-back-and-apply-log

MySQL Enterprise Backup  Ver 8.0.20-commercial for Win64 on x86_64 (MySQL Enterprise - Commercial)

Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Starting with following command line ...

 mysqlbackup.exe --defaults-file=E:\workspace\data\my.ini

        --backup-image=E:\dumps\BACKUP\FULL_20211009_123244.img

        --backup-dir=C:\Temp\TMPDUMP --encrypt-password=xxxxxxxxxxxxxxxxx

        copy-back-and-apply-log


IMPORTANT: Please check that mysqlbackup run completes successfully.

           At the end of a successful 'copy-back-and-apply-log' run mysqlbackup

           prints "mysqlbackup completed OK!".


210914 14:43:14 MAIN    INFO: Starting to log actions.

210914 14:43:14 MAIN    INFO: Backup directory exists: 'C:\Temp\TMPDUMP'

210914 14:43:14 MAIN    INFO: Backup Image MEB version string: 8.0.20 [2020-03-31  10:47:11]

210914 14:43:14 MAIN    INFO: MySQL server version is '8.0.20'

210914 14:43:14 MAIN   ERROR: The innodb_log_file_size value 4294967296 is invalid. The backup has been taken with 1073741824.

210914 14:43:14 MAIN   ERROR: Server repository configuration problem found.

mysqlbackup exit code: 7, Invalid Argument

mysqlbackup failed with errors!

=========================================================================

Solution: 

modify the innodb_log_file_size parameter value from my.ini configuration file to 4294967296. Thats it.

Then try to run the MEB database restore script,it will get success.

MYSQL::Steps to perform mysql enterprise database backup restore #Backup restore #MEB restore

Steps to perform mysql enterprise database backup restore:mysql 8.0.20

Commands used:

mysqlbackup.exe --defaults-file=E:\workspace\data\my.ini --backup-image=E:\dumps\BACKUP\FULL_20211009_123244.img --backup-dir=C:\Temp\TMPDUMP --encrypt-password="DATABASENAME_Encrypti0n@3" copy-back-and-apply-log


Note: Mention the encrypt password which referenced from the production server backup.

======================================================================

C:\Program Files\MySQL\mysql-backup-8.0.20\bin>mysqlbackup.exe --defaults-file=E:\workspace\data\my.ini --backup-image=E:\dumps\BACKUP\FULL_20211009_123244.img --backup-dir=C:\Temp\TMPDUMP --encrypt-password="DATABASENAME_Encrypti0n@3" copy-back-and-apply-log

MySQL Enterprise Backup  Ver 8.0.20-commercial for Win64 on x86_64 (MySQL Enterprise - Commercial)

Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Starting with following command line ...

 mysqlbackup.exe --defaults-file=E:\workspace\data\my.ini

        --backup-image=E:\dumps\BACKUP\FULL_20211009_123244.img

        --backup-dir=C:\Temp\TMPDUMP --encrypt-password=xxxxxxxxxxxxxxxxx

        copy-back-and-apply-log


IMPORTANT: Please check that mysqlbackup run completes successfully.

           At the end of a successful 'copy-back-and-apply-log' run mysqlbackup

           prints "mysqlbackup completed OK!".


210914 14:48:25 MAIN    INFO: Starting to log actions.

210914 14:48:25 MAIN    INFO: Backup directory exists: 'C:\Temp\TMPDUMP'

210914 14:48:25 MAIN    INFO: Backup Image MEB version string: 8.0.20 [2020-03-31  10:47:11]

210914 14:48:26 MAIN    INFO: MySQL server version is '8.0.20'

210914 14:48:26 MAIN    INFO: Server is not a community server.

210914 14:48:26 MAIN    INFO: KEF source path:'C:/Temp/TMPDUMP/meta/keyring_kef'

210914 14:48:26 MAIN    INFO: KEF target path:'E:/workspace/data/Data/keyring_kef'

210914 14:48:26 MAIN    INFO: TDE Keyring service initialized.

210914 14:48:26 MAIN    INFO: MEB logfile created at C:\Temp\TMPDUMP\meta\MEB_2021-09-14.14-48-26_copy_back_img_to_datadir.log


--------------------------------------------------------------------

                       Server Repository Options:

--------------------------------------------------------------------

  datadir                        = E:\workspace\data\Data

  innodb_data_home_dir           = E:\workspace\data\Data

  innodb_data_file_path          = ibdata1:12M:autoextend

  innodb_log_group_home_dir      = E:\workspace\data\Data

  innodb_log_files_in_group      = 2

  innodb_log_file_size           = 1073741824

  innodb_undo_directory          = E:\workspace\data\Data

  innodb_undo_tablespaces        = 2

  innodb_buffer_pool_filename    = ib_buffer_pool

  innodb_page_size               = Null

  innodb_checksum_algorithm      = crc32


--------------------------------------------------------------------

                       Backup Config Options:

--------------------------------------------------------------------

  datadir                        = C:\Temp\TMPDUMP\datadir

  innodb_data_home_dir           = C:\Temp\TMPDUMP\datadir

  innodb_data_file_path          = ibdata1:12M:autoextend

  innodb_log_group_home_dir      = C:\Temp\TMPDUMP\datadir

  innodb_log_files_in_group      = 2

  innodb_log_file_size           = 1073741824

  innodb_undo_directory          = C:\Temp\TMPDUMP\datadir

  innodb_undo_tablespaces        = 2

  innodb_buffer_pool_filename    = ib_buffer_pool

  innodb_page_size               = 16384

  innodb_checksum_algorithm      = crc32


210914 14:48:26 MAIN    INFO: Creating 14 buffers each of size 16777216.

210914 14:48:26 MAIN    INFO: Copy-back-and-apply-log operation starts with following threads

                1 read-threads    6 process-threads    1 write-threads

210914 14:48:26 PCR1    INFO: Copying database directory: meta

210914 14:48:26 RDR1    INFO: Copying ibdata1.

210914 14:48:27 RDR1 Progress in MB: 200 400 600 800 1000

210914 14:48:29 RDR1    INFO: Copying undo_002.

210914 14:48:29 RDR1    INFO: Copying undo_001.

210914 14:48:30 RDR1    INFO: Copying sys/sys_config.ibd.


210914 14:50:54 RDR1    INFO: Copying mysql.ibd.

210914 14:50:54 RDR1    INFO: Copying DATABASENAMEDBUAT3-bin.000070.

210914 14:50:54 RDR1 Progress in MB: 39800 40000 40200 40400 40600

210914 14:50:57 RDR1    INFO: Copying DATABASENAMEDBUAT3-bin.000071.

210914 14:50:57 RDR1 Progress in MB: 40800 41000 41200 41400 41600 41800

210914 14:51:00 PCR5    INFO: Copying database directory: #clone

210914 14:51:00 PCR3    INFO: Copying database directory: DATABASENAME

210914 14:51:00 PCR4    INFO: Copying database directory: mysql

210914 14:51:00 PCR6    INFO: Copying database directory: mysql_innodb_cluster_metadata

210914 14:51:00 RDR1    INFO: Binlog Log Index:    'E:/workspace/data/Data/DATABASENAMEDBUAT3-bin.index'

210914 14:51:00 PCR2    INFO: Copying database directory: performance_schema

210914 14:51:00 RDR1    INFO: Copying DATABASENAMEDBUAT3-bin.000072.

210914 14:51:00 PCR2    INFO: Copying database directory: sys

210914 14:51:01 RDR1 Progress in MB: 42000 42200 42400

210914 14:51:03 MAIN    INFO: MySQL server version is '8.0.20-commercial'

210914 14:51:03 MAIN    INFO: Restoring ...8.0.20-commercial version

210914 14:51:03 MAIN WARNING: External plugins list found in meta/backup_content.xml. Please ensure that all plugins are installed in restored server.

210914 14:51:03 MAIN    INFO: Copy-back operation completed successfully.

210914 14:51:03 MAIN    INFO: Source Image Path = E:\dumps\BACKUP\FULL_20211009_123244.img

.

.

.

210914 14:51:03 MAIN    INFO: MySQL server version is '8.0.20-commercial'

210914 14:51:03 MAIN    INFO: Restoring ...8.0.20-commercial version

210914 14:51:03 MAIN    INFO: Creating 14 buffers each of size 65536.

210914 14:51:03 MAIN    INFO: Apply-log operation starts with following threads

                1 read-threads    1 process-threads    6 apply-threads

210914 14:51:03 MAIN    INFO: Using up to 100 MB of memory.

210914 14:51:03 MAIN    INFO: Loading keys from 'C:/Temp/TMPDUMP/meta/keyring_kef'.

210914 14:51:03 MAIN    INFO: Initialized keyring(1 keys) for apply-log.

210914 14:51:03 MAIN    INFO: ibbackup_logfile's creation parameters:

          start lsn 402744199680, end lsn 402744486896,

          start checkpoint 402744200010.


210914 14:51:12 MAIN    INFO: Loading the space id : 3391, space name : E:/workspace/data/Data/mysql/backup_progress.ibd.

210914 14:51:12 MAIN    INFO: Loading the space id : 3380, space name : E:/workspace/data/Data/mysql_innodb_cluster_metadata/async_cluster_members.ibd.

210914 14:51:12 MAIN    INFO: Loading the space id : 3379, space name : E:/workspace/data/Data/mysql_innodb_cluster_metadata/async_cluster_views.ibd.

210914 14:51:12 MAIN    INFO: Loading the space id : 3377, space name : E:/workspace/data/Data/mysql_innodb_cluster_metadata/clusters.ibd.

210914 14:51:12 MAIN    INFO: Loading the space id : 3378, space name : E:/workspace/data/Data/mysql_innodb_cluster_metadata/instances.ibd.

210914 14:51:12 MAIN    INFO: Loading the space id : 3382, space name : E:/workspace/data/Data/mysql_innodb_cluster_metadata/router_rest_accounts.ibd.

210914 14:51:12 MAIN    INFO: Loading the space id : 3381, space name : E:/workspace/data/Data/mysql_innodb_cluster_metadata/routers.ibd.

210914 14:51:12 MAIN    INFO: Loading the space id : 1121, space name : E:/workspace/data/Data/sys/sys_config.ibd.

210914 14:51:12 MAIN    INFO: Loading the space id : 4294967294, space name : E:/workspace/data/Data/mysql.ibd.

210914 14:51:12 MAIN    INFO: Loading the space id : 4294967279, space name : E:/workspace/data/Data/undo_001.

210914 14:51:12 MAIN    INFO: Loading the space id : 4294967278, space name : E:/workspace/data/Data/undo_002.

210914 14:51:12 PCR1    INFO: Starting to parse redo log at lsn = 402744199843, whereas checkpoint_lsn = 402744200010.

210914 14:51:12 PCR1    INFO: Doing recovery: scanned up to log sequence number 402744486896.

210914 14:51:12 PCR1    INFO: Starting to apply a batch of log records to the database....

InnoDB: Progress in percent: 0

210914 14:51:14 PCR1    INFO: Updating last checkpoint to 402744486194 in redo log/

210914 14:51:14 PCR1    INFO: Setting 'ib_logfile0' file size to 1073741824

210914 14:51:14 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 10%.

210914 14:51:15 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 20%.

210914 14:51:15 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 30%.

210914 14:51:15 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 40%.

210914 14:51:15 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 50%.

210914 14:51:15 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 60%.

210914 14:51:15 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 70%.

210914 14:51:15 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 80%.

210914 14:51:15 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 90%.

210914 14:51:15 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 100%.

210914 14:51:19 PCR1    INFO: Setting 'ib_logfile1' file size to 1073741824

210914 14:51:19 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 10%.

210914 14:51:19 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 20%.

210914 14:51:19 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 30%.

210914 14:51:19 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 40%.

210914 14:51:19 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 50%.

210914 14:51:19 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 60%.

210914 14:51:20 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 70%.

210914 14:51:20 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 80%.

210914 14:51:20 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 90%.

210914 14:51:20 PCR1    INFO: Setting log file  size to 1024 MB. Progress : 100%.

210914 14:51:23 PCR1    INFO: Log file header:

         format = 4

         pad1 = 0

         start lsn = 402744485888

         checkpoint lsn = 402744486194

         checksum = 482103000

         creator = MEB 8.0.20

210914 14:51:23 PCR1    INFO: We were able to parse ibbackup_logfile up to

          lsn 402744486896.

210914 14:51:23 PCR1    INFO: Last MySQL binlog file position 0 -1, file name DATABASENAMEDBUAT3-bin.000072

210914 14:51:23 PCR1    INFO: The first data file is 'E:/workspace/data/Data/ibdata1'

                              and the new created log files are at 'E:\workspace\data\Data'

210914 14:51:23 MAIN    INFO: The Keyring encryption file is restored at 'E:/workspace/data/Data/keyring_kef' from 'C:/Temp/TMPDUMP/meta/keyring_kef'.

210914 14:51:23 MAIN    INFO: Apply-log operation completed successfully.

210914 14:51:23 MAIN    INFO: Full Backup has been restored successfully.

mysqlbackup completed OK! with 1 warnings

C:\Program Files\MySQL\mysql-backup-8.0.20\bin>

======================================================================

Note: Mysql database backup restore got success if we see mysqlbackup completed OK! in the end of the restore log.

MYSQL::Steps to take Mysql Enterprise backup #Backup #MEB #

  Steps to take Mysql Enterprise backup:

================================================

Commands used:

mysqlbackup --user=mysqlbackup -pxxxxxxxxxxx --port=3306 --protocol=tcp

        --with-timestamp --backup-dir=D:\backuplogs --read-threads=6

        --process-threads=12 --write-threads=6 --limit-memory=9999

        --number-of-buffers=2000MB --no-locking --skip-relaylog --skip-binlog

        --encrypt-password=xxxxxxxxxxxxxxxxx

        --backup-image=D:\backuplogs\FULL_20211009_123244.img

        --messages-logdir=D:\backuplogs backup-to-image

===============================================


Microsoft Windows [Version 10.0.17763.1999]

(c) 2018 Microsoft Corporation. All rights reserved.


C:\Users\kumar.velayutham>cd C:\Program Files\MySQL\mysql-backup-8.0.20\bin


C:\Program Files\MySQL\mysql-backup-8.0.20\bin>mysqlbackup --user=mysqlbackup -pmysqlbackup --port=3306 --protocol=tcp --with-timestamp --backup-dir="D:\backuplogs" --read-threads=6 --process-threads=12 --write-threads=6 --limit-memory=9999 --number-of-buffers=2000MB --no-locking --skip-relaylog --encrypt-password=PASSWORD# --backup-image="D:\backuplogs\FULL_%date:~10,4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%.img" --messages-logdir=D:\backuplogs backup-to-image

MySQL Enterprise Backup  Ver 8.0.20-commercial for Win64 on x86_64 (MySQL Enterprise - Commercial)

Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Starting with following command line ...

 mysqlbackup --user=mysqlbackup -pxxxxxxxxxxx --port=3306 --protocol=tcp

        --with-timestamp --backup-dir=D:\backuplogs --read-threads=6

        --process-threads=12 --write-threads=6 --limit-memory=9999

        --number-of-buffers=2000MB --no-locking --skip-relaylog

        --encrypt-password=xxxxxxxxxxxxxxxxx

        --backup-image=D:\backuplogs\FULL_20211009_123244.img

        --messages-logdir=D:\backuplogs backup-to-image


IMPORTANT: Please check that mysqlbackup run completes successfully.

           At the end of a successful 'backup-to-image' run mysqlbackup

           prints "mysqlbackup completed OK!".


210910 12:32:45 MAIN    INFO: Starting to log actions.

210910 12:32:45 MAIN    INFO: MEB logfile created at D:\backuplogs\MEB_2021-09-10.12-32-45_image_backup.log


210910 12:32:45 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:45 MAIN    INFO: MySQL server version is '8.0.20-commercial'

210910 12:32:45 MAIN    INFO: MySQL server compile os version is 'Win64'

210910 12:32:45 MAIN    INFO: SSL/TLS version used for connection is TLSv1.3

210910 12:32:45 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:45 MAIN    INFO: Got some server configuration information from running server.


210910 12:32:45 MAIN    INFO: Establishing connection to server for locking.

210910 12:32:45 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:45 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:45 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:45 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:45 MAIN    INFO: Backup directory created: 'D:/backuplogs/2021-09-10_12-32-45'

210910 12:32:45 MAIN    INFO: MySQL server version_comment is 'MySQL Enterprise Server - Commercial'

210910 12:32:45 MAIN    INFO: Mysqlbackup component not installed.

210910 12:32:45 MAIN    INFO: Server is not a community server.

210910 12:32:45 MAIN    INFO: Current active keyring 'keyring_encrypted_file'

210910 12:32:45 MAIN    INFO: KEF source path:'D:/workspace/keyring/keyring'

210910 12:32:45 MAIN    INFO: KEF target path:'D:/backuplogs/2021-09-10_12-32-45/meta/keyring_kef'

210910 12:32:45 MAIN    INFO: TDE Keyring service initialized.

--------------------------------------------------------------------

                       Server Repository Options:

--------------------------------------------------------------------

  datadir                        = D:\workspace\data\

  innodb_data_home_dir           =

  innodb_data_file_path          = ibdata1:12M:autoextend

  innodb_log_group_home_dir      = D:\workspace\data\

  innodb_log_files_in_group      = 2

  innodb_log_file_size           = 1073741824

  innodb_undo_directory          = D:\workspace\data\

  innodb_undo_tablespaces        = 2

  innodb_buffer_pool_filename    = ib_buffer_pool

  innodb_page_size               = 16384

  innodb_checksum_algorithm      = crc32


--------------------------------------------------------------------

                       Backup Config Options:

--------------------------------------------------------------------

  datadir                        = D:\backuplogs\2021-09-10_12-32-45\datadir

  innodb_data_home_dir           = D:\backuplogs\2021-09-10_12-32-45\datadir

  innodb_data_file_path          = ibdata1:12M:autoextend

  innodb_log_group_home_dir      = D:\backuplogs\2021-09-10_12-32-45\datadir

  innodb_log_files_in_group      = 2

  innodb_log_file_size           = 1073741824

  innodb_undo_directory          = D:\backuplogs\2021-09-10_12-32-45\datadir

  innodb_undo_tablespaces        = 2

  innodb_buffer_pool_filename    = ib_buffer_pool

  innodb_page_size               = 16384

  innodb_checksum_algorithm      = crc32


Backup Image Path = D:\backuplogs\FULL_20211009_123244.img

210910 12:32:45 MAIN    INFO: Unique generated backup id for this is 16312483653165319


210910 12:32:45 MAIN    INFO: Copying the server config file 'D:/workspace/data/auto.cnf'

210910 12:32:45 MAIN    INFO: Copying the server config file 'D:/workspace/data/mysqld-auto.cnf'

210910 12:32:45 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:45 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:45 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:46 MAIN    INFO: Creating 112 buffers each of size 16777216.

210910 12:32:46 MAIN    INFO: Failed to start redo log archiving...

210910 12:32:46 MAIN    INFO: Found checkpoint at lsn 402744200010.

210910 12:32:46 MAIN    INFO: Starting log scan from lsn = 402744199680 at offset = 91777536 and checkpoint = 402744200010 in file D:/workspace/data/ib_logfile1.

210910 12:32:46 MAIN    INFO: This backup has encrypted tables or encrypted binary log files, encrypt password is set.

210910 12:32:46 MAIN    INFO: Full Image Backup operation starts with following threads

                6 read-threads    12 process-threads    6 write-threads

210910 12:32:46 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:46 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:46 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:46 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:46 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:46 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:32:46 RDR2    INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/backup-my.cnf.

210910 12:32:46 RDR1    INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/meta/backup_create.xml.

210910 12:32:46 RDR4    INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/datadir/backup-auto.cnf.

210910 12:32:46 RLP1    INFO: Starting to parse redo log at lsn = 402744199843, whereas checkpoint_lsn = 402744200010.

210910 12:32:46 RDR5    INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/datadir/backup-mysqld-auto.cnf.

210910 12:32:46 RDR3    INFO: Starting to copy all innodb files...

210910 12:32:46 RDR3    INFO: Copying D:/workspace/data/ibdata1.

210910 12:32:46 RDR6 Progress in MB: 200 400 600 800 1000

210910 12:32:48 RDR4    INFO: Starting to copy all undo files...

210910 12:32:48 RDR4    INFO: Copying D:/workspace/data/undo_002.

210910 12:32:48 RDR5    INFO: Copying D:/workspace/data/undo_001.

210910 12:33:02 RDR4    INFO: Copying D:/workspace/data/sys/sys_config.ibd.

:

:

:

210910 12:40:16 RDR5    INFO: Copying D:/workspace/data/mysql.ibd.

210910 12:40:16 RDR3    INFO: Completing the copy of innodb files.

210910 12:40:16 RDR3    INFO: Requesting a dump of the InnoDB buffer pool

210910 12:40:16 RDR3    INFO: Waiting for the dump of the InnoDB buffer pool to complete

210910 12:40:17 RDR3    INFO: The dump of the InnoDB buffer pool completed

210910 12:40:17 RDR6    INFO: Binary Log Index:    'D:/workspace/data/DATABASENAMEDBUAT3-bin.index'

210910 12:40:17 RDR6    INFO: Starting to copy Binlog files.

210910 12:40:17 RDR6    INFO: Copying D:/workspace/data/DATABASENAMEDBUAT3-bin.000070.

210910 12:40:18 RDR5 Progress in MB: 39800 40000 40200 40400 40600

210910 12:40:25 RDR6    INFO: Copying D:/workspace/data/DATABASENAMEDBUAT3-bin.000071.

210910 12:40:26 RDR2 Progress in MB: 40800 41000 41200 41400 41600 41800

210910 12:40:33 RDR6    INFO: Starting to lock instance for backup...

210910 12:40:33 RDR6    INFO: The server instance is locked for backup.

210910 12:40:33 RDR6    INFO: Requesting flush of redo log reading after LSN 402744479001.

210910 12:40:33 RDR6    INFO: Requesting flush of redo log processing after LSN 402744479001.

210910 12:40:33 RDR6    INFO: Completed flush of redo log reading after LSN 402744479001.

210910 12:40:33 RDR6    INFO: Completed flush of redo log processing after LSN 402744479001.

210910 12:40:37 RDR6    INFO: Opening backup source directory 'D:/workspace/data'

210910 12:40:37 RDR6    INFO: Starting to copy non-innodb files in subdirs of 'D:/workspace/data'

210910 12:40:37 RDR6    INFO: Completing the copy of all non-innodb files.

210910 12:40:45 WTR2    INFO: Adding database directory: datadir/#clone

210910 12:40:45 WTR2    INFO: Adding database directory: datadir/DATABASENAME

210910 12:40:45 WTR6    INFO: Adding database directory: datadir/mysql

210910 12:40:45 WTR6    INFO: Adding database directory: datadir/mysql_innodb_cluster_metadata

210910 12:40:45 WTR2    INFO: Adding database directory: datadir/performance_schema

210910 12:40:45 WTR2    INFO: Adding database directory: datadir/sys

210910 12:40:46 RDR6    INFO: Requesting consistency information...

210910 12:40:46 RDR6    INFO: Locked the consistency point for 1094 microseconds.

210910 12:40:46 RDR6    INFO: Consistency point server_uuid '4249a073-c8c1-11ea-92ab-005056843959'.

210910 12:40:46 RDR6    INFO: Consistency point gtid_executed '56be8ffc-c8b3-11ea-93d3-00505684f7cd:1-17752057:18362763,

d1552329-9fff-11e9-aa0b-00505694881c:1-77'.

210910 12:40:46 RDR6    INFO: Consistency point binary_log_file 'DATABASENAMEDBUAT3-bin.000072'.

210910 12:40:46 RDR6    INFO: Consistency point binary_log_position 692934398.

210910 12:40:46 RDR6    INFO: Consistency point replication channel 'group_replication_applier':

210910 12:40:46 RDR6    INFO: Consistency point relay_log_file 'DATABASENAMEDBUAT3-relay-log-bin-group_replication_applier.000020':

210910 12:40:46 RDR6    INFO: Consistency point relay_log_position 353.

210910 12:40:46 RDR6    INFO: Consistency point replication channel 'group_replication_recovery':

210910 12:40:46 RDR6    INFO: Consistency point relay_log_file 'DATABASENAMEDBUAT3-relay-log-bin-group_replication_recovery.000002':

210910 12:40:46 RDR6    INFO: Consistency point relay_log_position 152.

210910 12:40:46 RDR6    INFO: Consistency point InnoDB lsn 402744486896.

210910 12:40:46 RDR6    INFO: Consistency point InnoDB lsn_checkpoint 402744486194.

210910 12:40:46 RDR6    INFO: Requesting completion of redo log copy after LSN 402744486896.

210910 12:40:46 RLR1    INFO: Redo log reader waited 30145 times for a total of 150725.00 ms for logs to generate.

210910 12:40:46 RLW1    INFO: A copied database page was modified at 402744450628. (This is the highest lsn found on a page)

210910 12:40:46 RLW1    INFO: Scanned log up to lsn 402744486896.

210910 12:40:46 RLW1    INFO: Was able to parse the log up to lsn 402744486896.

210910 12:40:46 RDR1    INFO: Copying D:/workspace/data/DATABASENAMEDBUAT3-bin.000072.

210910 12:40:47 RDR6 Progress in MB: 42000 42200 42400

210910 12:40:50 RDR6    INFO: Completed the copy of binlog files...

210910 12:40:50 RDR6    INFO: The server instance is unlocked after 16.738 seconds.

210910 12:40:50 RDR6    INFO: Found encrypted tablespaces or encrypted binary logs, migrating the keys.

210910 12:40:50 RDR6    INFO: Active keyring "keyring_encrypted_file" detected.

210910 12:40:50 RDR6    INFO: KEF Keyring generated at 'D:/backuplogs/2021-09-10_12-32-45/meta/keyring_kef'.

210910 12:40:50 RDR6    INFO: Reading all global variables from the server.

210910 12:40:50 RDR6    INFO: Completed reading of all 625 global variables from the server.

210910 12:40:50 RDR6    INFO: Writing server defaults files 'server-my.cnf' and 'server-all.cnf' for server '8.0.20-commercial' in 'D:\backuplogs\2021-09-10_12-32-45'.

210910 12:40:53 RDR6    INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/meta/backup_variables.txt.

210910 12:40:53 RDR2    INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/datadir/ibbackup_logfile.

210910 12:40:53 RDR4    INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/server-all.cnf.

210910 12:40:53 RDR3    INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/server-my.cnf.

210910 12:40:53 RDR5    INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/meta/backup_gtid_executed.sql.

210910 12:40:53 RDR1    INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/meta/keyring_kef.

210910 12:40:53 RDR6    INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/meta/backup_content.xml.

210910 12:40:53 RDR4    INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/meta/image_files.xml.

210910 12:40:54 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:40:54 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:40:54 MAIN    INFO: SSL: attempting to use an SSL connection.

210910 12:40:54 MAIN    INFO: Group replication setup detected.

210910 12:40:54 MAIN    INFO: Current node is a primary node

210910 12:40:55 MAIN    INFO: Full Image Backup operation completed successfully.

210910 12:40:55 MAIN    INFO: Backup image created successfully.

210910 12:40:55 MAIN    INFO: Image Path = D:\backuplogs\FULL_20211009_123244.img

210910 12:40:55 MAIN    INFO: MySQL binlog position: filename DATABASENAMEDBUAT3-bin.000072, position -1

210910 12:40:55 MAIN    INFO: GTID_EXECUTED is 56be8ffc-c8b3-11ea-93d3-00505684f7cd:1-17752057:18362763,d1552329-9fff-11e9-aa0b-00505694881c:1-77


-------------------------------------------------------------

   Parameters Summary

-------------------------------------------------------------

   Start LSN                  : 402744199680

   End LSN                    : 402744486896

-------------------------------------------------------------


mysqlbackup completed OK!


C:\Program Files\MySQL\mysql-backup-8.0.20\bin>


Note: If mysqlbackup completed OK means--Backup got success.

MYSQL::To set readonly false for secondary server to forcefully to take this as primary as standalone node#read only false

 --To set readonly false for secondary server to forcefully to take this as primary 

as standalone node.

Scenario: Issue in innodb cluster and if resolution take more time to fix means,

 We can take one of the node forcefully as read write from the latest gtids node.

mysql> DROP DATABASE mysql_innodb_cluster_metadata;

Query OK, 15 rows affected (0.13 sec)

mysql>  SET GLOBAL READ_ONLY=0;

ERROR 2006 (HY000): MySQL server has gone away

No connection. Trying to reconnect...

Connection id:    78805

Current database: *** NONE ***

Query OK, 0 rows affected (0.00 sec)

mysql> go

Then inform application team to connect this database server ip directly in 

their connection string instead of mysql router way.

MYSQL::Cluster creation and node addition after node read write made during off business hours for 3TB mysql database#createCluster #addInstance #rescan() #status

 --Cluster creation and node addition after node read write made during 

--off business hours for 3TB mysql database.

Scenario: both node of mysql innodb cluster rebooted by windows team patch by

mistake.

Split brain scenario came in to innodb cluster case. So one available mysql innodb

cluster node went into read only mode.

Resolution took more time to fix. So activated that available read only mode to

read write mode by breaking the group replication.

Mangement asked to create the cluster as like earlier at off business hours.


Here are the steps to create the INNODB cluster group replication at MYSQL DATABASE.

#createCluster #addInstance #rescan() #status


 MySQL  JS > \c adminlogin@DBCLUSTERNODEIP1:3306

Creating a session to 'adminlogin@DBCLUSTERNODEIP1:3306'

Fetching schema names for autocompletion... Press ^C to stop.

Your MySQL connection id is 75944

Server version: 8.0.20-commercial MySQL Enterprise Server - Commercial

No default schema selected; type \use <schema> to set one.

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > var cluster =dba.getCluster();

Dba.getCluster: This function is not available through a session to a standalone instance (RuntimeError)

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > var cluster =dba.getCluster();

Dba.getCluster: MySQL server has gone away (RuntimeError)

The global session got disconnected..

Attempting to reconnect to 'mysql://adminlogin@DBCLUSTERNODEIP1:3306'..

The global session was successfully reconnected.

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

TypeError: Cannot read property 'status' of undefined

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > dba.createCluster('prodclust');

A new InnoDB cluster will be created on instance 'DBCLUSTERNODEIP1:3306'.


Validating instance configuration at DBCLUSTERNODEIP1:3306...


This instance reports its own address as DBCLUSTERNODEIP1:3306


Instance configuration is suitable.

NOTE: Group Replication will communicate with other members using 'DBCLUSTERNODEIP1:33061'. Use the localAddress option to override.


Creating InnoDB cluster 'prodclust' on 'DBCLUSTERNODEIP1:3306'...


Adding Seed Instance...

WARNING: User 'mysql_innodb_cluster_11'@'%' already existed at instance 'DBCLUSTERNODEIP1:3306'. It will be deleted and created again with a new password.

Cluster successfully created. Use Cluster.addInstance() to add MySQL instances.

At least 3 instances are needed for the cluster to be able to withstand up to

one server failure.


<Cluster:prodclust>

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

TypeError: Cannot read property 'status' of undefined

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > var cluster =dba.getCluster();

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

{

    "clusterName": "prodclust",

    "defaultReplicaSet": {

        "name": "default",

        "primary": "DBCLUSTERNODEIP1:3306",

        "ssl": "REQUIRED",

        "status": "OK_NO_TOLERANCE",

        "statusText": "Cluster is NOT tolerant to any failures.",

        "topology": {

            "DBCLUSTERNODEIP1:3306": {

                "address": "DBCLUSTERNODEIP1:3306",

                "mode": "R/W",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            }

        },

        "topologyMode": "Single-Primary"

    },

    "groupInformationSourceMember": "DBCLUSTERNODEIP1:3306"

}

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > clus.addInstance('adminlogin@DBCLUSTERNODEIP2:3306');

ReferenceError: clus is not defined

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.addInstance('adminlogin@DBCLUSTERNODEIP2:3306');

Please provide the password for 'adminlogin@DBCLUSTERNODEIP2:3306': **************

Save password for 'adminlogin@DBCLUSTERNODEIP2:3306'? [Y]es/[N]o/Ne[v]er (default No): y


WARNING: A GTID set check of the MySQL instance at 'DBCLUSTERNODEIP2:3306' determined that it contains transactions that do not originate from the cluster, which must be discarded before it can join the cluster.


DBCLUSTERNODEIP2:3306 has the following errant GTIDs that do not exist in the cluster:

dfc8fe40-336a-11ed-a8ea-005056847352:49231601-49231871


WARNING: Discarding these extra GTID events can either be done manually or by completely overwriting the state of DBCLUSTERNODEIP2:3306 with a physical snapshot from an existing cluster member. To use this method by default, set the 'recoveryMethod' option to 'clone'.


Having extra GTID events is not expected, and it is recommended to investigate this further and ensure that the data can be removed prior to choosing the clone recovery method.


Please select a recovery method [C]lone/[A]bort (default Abort): ^C

Cluster.addInstance: Cancelled (RuntimeError)

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

{

    "clusterName": "prodclust",

    "defaultReplicaSet": {

        "name": "default",

        "primary": "DBCLUSTERNODEIP1:3306",

        "ssl": "REQUIRED",

        "status": "OK_NO_TOLERANCE",

        "statusText": "Cluster is NOT tolerant to any failures.",

        "topology": {

            "DBCLUSTERNODEIP1:3306": {

                "address": "DBCLUSTERNODEIP1:3306",

                "mode": "R/W",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            }

        },

        "topologyMode": "Single-Primary"

    },

    "groupInformationSourceMember": "DBCLUSTERNODEIP1:3306"

}

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.addInstance('adminlogin@DBCLUSTERNODEIP3:3306');

Please provide the password for 'adminlogin@DBCLUSTERNODEIP3:3306': **************

Save password for 'adminlogin@DBCLUSTERNODEIP3:3306'? [Y]es/[N]o/Ne[v]er (default No): y


WARNING: A GTID set check of the MySQL instance at 'DBCLUSTERNODEIP3:3306' determined that it contains transactions that do not originate from the cluster, which must be discarded before it can join the cluster.


DBCLUSTERNODEIP3:3306 has the following errant GTIDs that do not exist in the cluster:

dfc8fe40-336a-11ed-a8ea-005056847352:49231601-49231876


WARNING: Discarding these extra GTID events can either be done manually or by completely overwriting the state of DBCLUSTERNODEIP3:3306 with a physical snapshot from an existing cluster member. To use this method by default, set the 'recoveryMethod' option to 'clone'.


Having extra GTID events is not expected, and it is recommended to investigate this further and ensure that the data can be removed prior to choosing the clone recovery method.


Please select a recovery method [C]lone/[A]bort (default Abort): C

NOTE: Group Replication will communicate with other members using 'DBCLUSTERNODEIP3:33061'. Use the localAddress option to override.


Validating instance configuration at DBCLUSTERNODEIP3:3306...


This instance reports its own address as DBCLUSTERNODEIP3:3306


Instance configuration is suitable.

A new instance will be added to the InnoDB cluster. Depending on the amount of

data on the cluster this might take from a few seconds to several hours.


Adding instance to the cluster...


WARNING: User 'mysql_innodb_cluster_13'@'%' already existed at instance 'DBCLUSTERNODEIP1:3306'. It will be deleted and created again with a new password.

Monitoring recovery process of the new cluster member. Press ^C to stop monitoring and let it continue in background.

Clone based state recovery is now in progress.


NOTE: A server restart is expected to happen as part of the clone process. If the

server does not support the RESTART command or does not come back after a

while, you may need to manually start it back.


* Waiting for clone to finish...

NOTE: DBCLUSTERNODEIP3:3306 is being cloned from DBCLUSTERNODEIP1:3306

** Stage DROP DATA: Completed

** Clone Transfer

    FILE COPY  ############################################################  100%  Completed

    PAGE COPY  ############################################################  100%  Completed

    REDO COPY  ############################################################  100%  Completed


NOTE: DBCLUSTERNODEIP3:3306 is shutting down...


* Waiting for server restart... ready

* DBCLUSTERNODEIP3:3306 has restarted, waiting for clone to finish...

** Stage RESTART: Completed

* Clone process has finished: 3.55 TB transferred in 5 hours 50 min 18 sec (168.95 MB/s)


Incremental state recovery is now in progress.


* Waiting for distributed recovery to finish...

NOTE: 'DBCLUSTERNODEIP3:3306' is being recovered from 'DBCLUSTERNODEIP1:3306'

* Distributed recovery has finished


Cluster.addInstance: DBCLUSTERNODEIP1:3306: MySQL server has gone away (RuntimeError)

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

Cluster.status: MySQL server has gone away (RuntimeError)

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > var cluster =dba.getCluster();

Dba.getCluster: MySQL server has gone away (RuntimeError)

The global session got disconnected..

Attempting to reconnect to 'mysql://adminlogin@DBCLUSTERNODEIP1:3306'..

The global session was successfully reconnected.

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

Cluster.status: MySQL server has gone away (RuntimeError)

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

Cluster.status: MySQL server has gone away (RuntimeError)

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > var cluster =dba.getCluster();

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

{

    "clusterName": "prodclust",

    "defaultReplicaSet": {

        "name": "default",

        "primary": "DBCLUSTERNODEIP1:3306",

        "ssl": "REQUIRED",

        "status": "OK_NO_TOLERANCE",

        "statusText": "Cluster is NOT tolerant to any failures.",

        "topology": {

            "DBCLUSTERNODEIP1:3306": {

                "address": "DBCLUSTERNODEIP1:3306",

                "mode": "R/W",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            }

        },

        "topologyMode": "Single-Primary"

    },

    "groupInformationSourceMember": "DBCLUSTERNODEIP1:3306"

}

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.rescan();

Rescanning the cluster...


Result of the rescanning operation for the 'prodclust' cluster:

{

    "name": "prodclust",

    "newTopologyMode": null,

    "newlyDiscoveredInstances": [

        {

            "host": "DBCLUSTERNODEIP3:3306",

            "member_id": "08538d8c-ed98-11ea-852d-005056844240",

            "name": null,

            "version": "8.0.20"

        }

    ],

    "unavailableInstances": []

}


A new instance 'DBCLUSTERNODEIP3:3306' was discovered in the cluster.

Would you like to add it to the cluster metadata? [Y/n]: y

Adding instance to the cluster metadata...

The instance 'DBCLUSTERNODEIP3:3306' was successfully added to the cluster metadata.


 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

{

    "clusterName": "prodclust",

    "defaultReplicaSet": {

        "name": "default",

        "primary": "DBCLUSTERNODEIP1:3306",

        "ssl": "REQUIRED",

        "status": "OK_NO_TOLERANCE",

        "statusText": "Cluster is NOT tolerant to any failures.",

        "topology": {

            "DBCLUSTERNODEIP1:3306": {

                "address": "DBCLUSTERNODEIP1:3306",

                "mode": "R/W",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            },

            "DBCLUSTERNODEIP3:3306": {

                "address": "DBCLUSTERNODEIP3:3306",

                "mode": "R/O",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            }

        },

        "topologyMode": "Single-Primary"

    },

    "groupInformationSourceMember": "DBCLUSTERNODEIP1:3306"

}

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.addInstance('adminlogin@DBCLUSTERNODEIP2:3306');


WARNING: A GTID set check of the MySQL instance at 'DBCLUSTERNODEIP2:3306' determined that it contains transactions that do not originate from the cluster, which must be discarded before it can join the cluster.


DBCLUSTERNODEIP2:3306 has the following errant GTIDs that do not exist in the cluster:

dfc8fe40-336a-11ed-a8ea-005056847352:49231601-49231871


WARNING: Discarding these extra GTID events can either be done manually or by completely overwriting the state of DBCLUSTERNODEIP2:3306 with a physical snapshot from an existing cluster member. To use this method by default, set the 'recoveryMethod' option to 'clone'.


Having extra GTID events is not expected, and it is recommended to investigate this further and ensure that the data can be removed prior to choosing the clone recovery method.


Please select a recovery method [C]lone/[A]bort (default Abort): C

NOTE: Group Replication will communicate with other members using 'DBCLUSTERNODEIP2:33061'. Use the localAddress option to override.


Validating instance configuration at DBCLUSTERNODEIP2:3306...


This instance reports its own address as DBCLUSTERNODEIP2:3306


Instance configuration is suitable.

A new instance will be added to the InnoDB cluster. Depending on the amount of

data on the cluster this might take from a few seconds to several hours.


Adding instance to the cluster...


ERROR: Unable to enable clone on the instance 'DBCLUSTERNODEIP3:3306': Recovery user 'mysql_innodb_cluster_11' not created by InnoDB Cluster


WARNING: User 'mysql_innodb_cluster_12'@'%' already existed at instance 'DBCLUSTERNODEIP1:3306'. It will be deleted and created again with a new password.

Monitoring recovery process of the new cluster member. Press ^C to stop monitoring and let it continue in background.

Clone based state recovery is now in progress.


NOTE: A server restart is expected to happen as part of the clone process. If the

server does not support the RESTART command or does not come back after a

while, you may need to manually start it back.


* Waiting for clone to finish...

NOTE: DBCLUSTERNODEIP2:3306 is being cloned from DBCLUSTERNODEIP3:3306

** Stage DROP DATA: Completed

** Clone Transfer

    FILE COPY  ############################################################  100%  Completed

    PAGE COPY  ############################################################  100%  Completed

    REDO COPY  ############################################################  100%  Completed


NOTE: DBCLUSTERNODEIP2:3306 is shutting down...


* Waiting for server restart... ready

* DBCLUSTERNODEIP2:3306 has restarted, waiting for clone to finish...

** Stage RESTART: Completed

* Clone process has finished: 3.55 TB transferred in 5 hours 22 min 44 sec (183.33 MB/s)


Incremental state recovery is now in progress.


* Waiting for distributed recovery to finish...

NOTE: 'DBCLUSTERNODEIP2:3306' is being recovered from 'DBCLUSTERNODEIP1:3306'

* Distributed recovery has finished


Cluster.addInstance: DBCLUSTERNODEIP1:3306: MySQL server has gone away (RuntimeError)

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

Cluster.status: MySQL server has gone away (RuntimeError)

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > var cluster =dba.getCluster();

Dba.getCluster: MySQL server has gone away (RuntimeError)

The global session got disconnected..

Attempting to reconnect to 'mysql://adminlogin@DBCLUSTERNODEIP1:3306'..

The global session was successfully reconnected.

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

Cluster.status: MySQL server has gone away (RuntimeError)

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > var cluster =dba.getCluster();

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

{

    "clusterName": "prodclust",

    "defaultReplicaSet": {

        "name": "default",

        "primary": "DBCLUSTERNODEIP1:3306",

        "ssl": "REQUIRED",

        "status": "OK",

        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",

        "topology": {

            "DBCLUSTERNODEIP1:3306": {

                "address": "DBCLUSTERNODEIP1:3306",

                "mode": "R/W",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            },

            "DBCLUSTERNODEIP3:3306": {

                "address": "DBCLUSTERNODEIP3:3306",

                "mode": "R/O",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            }

        },

        "topologyMode": "Single-Primary"

    },

    "groupInformationSourceMember": "DBCLUSTERNODEIP1:3306"

}

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.rescan();

Rescanning the cluster...


Result of the rescanning operation for the 'prodclust' cluster:

{

    "name": "prodclust",

    "newTopologyMode": null,

    "newlyDiscoveredInstances": [

        {

            "host": "DBCLUSTERNODEIP2:3306",

            "member_id": "329fcb1a-c0dd-11eb-82b1-005056847352",

            "name": null,

            "version": "8.0.20"

        }

    ],

    "unavailableInstances": []

}


A new instance 'DBCLUSTERNODEIP2:3306' was discovered in the cluster.

Would you like to add it to the cluster metadata? [Y/n]: y

Adding instance to the cluster metadata...

The instance 'DBCLUSTERNODEIP2:3306' was successfully added to the cluster metadata.


 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS > cluster.status();

{

    "clusterName": "prodclust",

    "defaultReplicaSet": {

        "name": "default",

        "primary": "DBCLUSTERNODEIP1:3306",

        "ssl": "REQUIRED",

        "status": "OK",

        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",

        "topology": {

            "DBCLUSTERNODEIP1:3306": {

                "address": "DBCLUSTERNODEIP1:3306",

                "mode": "R/W",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            },

            "DBCLUSTERNODEIP2:3306": {

                "address": "DBCLUSTERNODEIP2:3306",

                "mode": "R/O",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            },

            "DBCLUSTERNODEIP3:3306": {

                "address": "DBCLUSTERNODEIP3:3306",

                "mode": "R/O",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            }

        },

        "topologyMode": "Single-Primary"

    },

    "groupInformationSourceMember": "DBCLUSTERNODEIP1:3306"

}

 MySQL  DBCLUSTERNODEIP1:3306 ssl  JS >


Note; Application Servers mysql router not able to connect means, Bootstrap of MYSQL Routers are required to connect back as like earlier.

MYSQL::MY-011505 Repl Plugin group_replication reported Member was expelled from the --group due to network failures changing member status to ERROR MY-011712 MY-011735

 #MY-011505 Repl Plugin group_replication reported Member was expelled from the 

--group due to network failures changing member status to ERROR MY-011712 MY-011735 

--Verified MISSING node ERROR node resolution#


Solution: cluster.rejoinInstance("adminlogin@DBSERVER_IP:3306") at primary node .


---------------------------------------------------------------------------------


 MySQL  JS > \c adminlogin@DBSERVER_IP:3306

Creating a session to 'adminlogin@DBSERVER_IP:3306'

Fetching schema names for autocompletion... Press ^C to stop.

Your MySQL connection id is 26666197

Server version: 8.0.20-commercial MySQL Enterprise Server - Commercial

No default schema selected; type \use <schema> to set one.

 MySQL  DBSERVER_IP:3306 ssl  JS > var cluster=dba.getCluster()

 MySQL  DBSERVER_IP:3306 ssl  JS > cluster.status();

{

    "clusterName": "uatcluster",

    "defaultReplicaSet": {

        "name": "default",

        "primary": "DBSERVER_IP:3306",

        "ssl": "REQUIRED",

        "status": "OK_NO_TOLERANCE",

        "statusText": "Cluster is NOT tolerant to any failures. 1 member is not active",

        "topology": {

            "DBSERVERIP1:3306": {

                "address": "DBSERVERIP1:3306",

                "mode": "R/O",

                "readReplicas": {},

                "role": "HA",

                "status": "(MISSING)"

            },

            "DBSERVER_IP:3306": {

                "address": "DBSERVER_IP:3306",

                "mode": "R/W",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            },

            "DBSERVERIP2:3306": {

                "address": "DBSERVERIP2:3306",

                "mode": "R/O",

                "readReplicas": {},

                "replicationLag": null,

                "role": "HA",

                "status": "ONLINE",

                "version": "8.0.20"

            }

        },

        "topologyMode": "Single-Primary"

    },

    "groupInformationSourceMember": "DBSERVER_IP:3306"

}

 MySQL  DBSERVER_IP:3306 ssl  JS > : cluster.rejoinInstance("adminlogin@DBSERVERIP1:3306")

SyntaxError: Unexpected token :

 MySQL  DBSERVER_IP:3306 ssl  JS > cluster.rejoinInstance("adminlogin@DBSERVERIP1:3306")

Rejoining the instance to the InnoDB cluster. Depending on the original

problem that made the instance unavailable, the rejoin operation might not be

successful and further manual steps will be needed to fix the underlying

problem.


Please monitor the output of the rejoin operation and take necessary action if

the instance cannot rejoin.


Rejoining instance to the cluster ...


The instance 'DBSERVERIP1:3306' was successfully rejoined on the cluster.


 MySQL  DBSERVER_IP:3306 ssl  JS >


---------------------------------------------------------------------------------

MYSQL::How do find the list of mysql routers connecting from application servers #Mysql Router Version# List of Routers

 --How do find the list of mysql routers connecting from application servers 

--to mysql database innodb cluster and their version.

--How do connect mysql shell.

MYSQL JS >\c cluadminlogin@DBSERVER_IP:3306

--Enter the password.

--Then declare the cluster variable.

MYSQL JS >var cluster =dba.getCluster();

--cluster.listRouters(); 

MySQL  DBSERVER_IP:3306 ssl  JS > cluster.listRouters();

{

    "clusterName": "prodclust",

    "routers": {

        "APPSERVER_IP1::": {

            "hostname": "APPSERVER_IP1",

            "lastCheckIn": "2023-02-06 08:36:12",

            "roPort": 6447,

            "roXPort": 6449,

            "rwPort": 6446,

            "rwXPort": 6448,

            "version": "8.0.21"

        },

        "APPSERVER_IP2::": {

            "hostname": "APPSERVER_IP2",

            "lastCheckIn": "2023-02-06 08:36:12",

            "roPort": 6447,

            "roXPort": 6449,

            "rwPort": 6446,

            "rwXPort": 6448,

            "version": "8.0.24"

        },

        "APPSERVER_IP3::": {

            "hostname": "APPSERVER_IP3",

            "lastCheckIn": "2023-02-06 08:36:15",

            "roPort": 6447,

            "roXPort": 6449,

            "rwPort": 6446,

            "rwXPort": 6448,

            "version": "8.0.24"

        },

        "APPSERVER_IP4::": {

            "hostname": "APPSERVER_IP4",

            "lastCheckIn": "2023-02-06 08:36:13",

            "roPort": 6447,

            "roXPort": 6449,

            "rwPort": 6446,

            "rwXPort": 6448,

            "version": "8.0.24"

        },

        "APPSERVER_IP5::": {

            "hostname": "APPSERVER_IP5",

            "lastCheckIn": "2023-02-06 08:36:13",

            "roPort": 6447,

            "roXPort": 6449,

            "rwPort": 6446,

            "rwXPort": 6448,

            "version": "8.0.24"

        },

        "APPSERVER_IP6::": {

            "hostname": "APPSERVER_IP6",

            "lastCheckIn": "2023-02-06 08:36:12",

            "roPort": 6447,

            "roXPort": 6449,

            "rwPort": 6446,

            "rwXPort": 6448,

            "version": "8.0.24"

        }

}

 MySQL  DBSERVER_IP:3306 ssl  JS >





MYSQL:::Seamless Data Archiving: Exporting, Importing, and Pruning MySQL Tables

  Seamless Data Archiving: Exporting, Importing, and Pruning MySQL Tables Introduction: In the dynamic landscape of database management...