tag:blogger.com,1999:blog-36725924652138540852024-03-07T02:16:36.416-08:00SQLDBATask along with MYSQL,Oracle,Postgresql,AzureBackup my known things and restoring it into DBA Learners.......kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.comBlogger107125tag:blogger.com,1999:blog-3672592465213854085.post-44691488776786047922024-03-06T20:52:00.000-08:002024-03-06T20:52:29.781-08:00MYSQL:::Seamless Data Archiving: Exporting, Importing, and Pruning MySQL Tables<p> </p><div style="background: white; border: solid #E3E3E3 1.0pt; mso-border-alt: solid #E3E3E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;">
<p class="MsoNormal" style="background: white; border: none; line-height: normal; margin-bottom: 15.0pt; mso-border-alt: solid #E3E3E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;"><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"><b>Seamless Data Archiving:
Exporting, Importing, and Pruning MySQL Tables</b><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; border: none; line-height: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #E3E3E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;"><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"><b>Introduction:</b> In the dynamic landscape of database
management, effective data archiving is a crucial component for maintaining
optimal performance and storage efficiency. This blog post outlines a seamless
process for exporting a specific table from a production database, importing it
into an archival server, and responsibly pruning records from the production
database.<o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; border: none; line-height: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #E3E3E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;"><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"><b>Export Script - Safely Extracting Data</b>: The export
process begins with a reliable MySQL export script, ensuring the safe
extraction of data from the production database. The script, executed with the </span><b><span style="border: solid #E3E3E3 1.0pt; color: #0d0d0d; font-family: "Ubuntu Mono"; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid #E3E3E3 .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none; padding: 0cm;">mysqldump</span></b><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"> command, exports a designated table (</span><b><span style="border: solid #E3E3E3 1.0pt; color: #0d0d0d; font-family: "Ubuntu Mono"; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid #E3E3E3 .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none; padding: 0cm;">TABLENAME</span></b><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;">) from the specified production database (</span><b><span style="border: solid #E3E3E3 1.0pt; color: #0d0d0d; font-family: "Ubuntu Mono"; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid #E3E3E3 .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none; padding: 0cm;">DATABASE_NAME</span></b><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;">). Noteworthy parameters include </span><b><span style="border: solid #E3E3E3 1.0pt; color: #0d0d0d; font-family: "Ubuntu Mono"; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid #E3E3E3 .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none; padding: 0cm;">--single-transaction</span></b><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"> for consistent snapshots, </span><b><span style="border: solid #E3E3E3 1.0pt; color: #0d0d0d; font-family: "Ubuntu Mono"; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid #E3E3E3 .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none; padding: 0cm;">--max-allowed-packet</span></b><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"> to accommodate large datasets, and </span><b><span style="border: solid #E3E3E3 1.0pt; color: #0d0d0d; font-family: "Ubuntu Mono"; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid #E3E3E3 .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none; padding: 0cm;">--where</span></b><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"> to filter records based on the creation date.<o:p></o:p></span></p>
</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody><tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 462.1pt;" valign="top" width="616">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt;"><span style="font-family: "Segoe UI", sans-serif; font-size: 12pt;"><span style="color: #2b00fe;">mysqldump -umysqlbackup -p -P3306 DATABASE_NAME TABLENAME
--single-transaction --max-allowed-packet=2G --no-create-info
--set-gtid-purged=OFF --where="created_on < '2022-01-01'" >
F:\FOREXPORTIMPORT_PROD_TO_ARCHIVAL\tablenamelessthan01012022.sql</span><span style="color: #0d0d0d;"><o:p></o:p></span></span></p>
</td>
</tr>
</tbody></table>
<div style="background: white; border: solid #E3E3E3 1.0pt; mso-border-alt: solid #E3E3E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;">
<p class="MsoNormal" style="background: white; border: none; line-height: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #E3E3E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;"><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span><span style="color: #0d0d0d; font-family: "Segoe UI", sans-serif; font-size: 12pt;"><b> </b></span><span style="color: #0d0d0d; font-family: "Segoe UI", sans-serif; font-size: 12pt;"><b>Import Script - Migrating to the Archival Server</b>:
Once the export is completed, the data is seamlessly imported into an archival
server using the </span><b><span style="border: solid #E3E3E3 1.0pt; color: #0d0d0d; font-family: "Ubuntu Mono"; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid #E3E3E3 .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none; padding: 0cm;">mysql</span></b><span style="color: #0d0d0d; font-family: "Segoe UI", sans-serif; font-size: 12pt;"> command. The import script specifies the archival
database (</span><b><span style="border: solid #E3E3E3 1.0pt; color: #0d0d0d; font-family: "Ubuntu Mono"; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid #E3E3E3 .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none; padding: 0cm;">DATABASE_NAME</span></b><span style="color: #0d0d0d; font-family: "Segoe UI", sans-serif; font-size: 12pt;">) and utilizes the previously exported SQL file.</span></p>
</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody><tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 462.1pt;" valign="top" width="616">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt;"><span style="font-family: "Segoe UI", sans-serif; font-size: 12pt;"><span style="color: #2b00fe;">mysql -umysqlbackup -p -P3306 DATABASE_NAME --max-allowed-packet=1G
< F:\FOREXPORTIMPORT_PROD_TO_ARCHIVAL\tablenamelessthan01012022.sql</span><span style="color: #0d0d0d;"><o:p></o:p></span></span></p>
</td>
</tr>
</tbody></table><br />If required, use --force flag to overwrite the existing data if any exist.<div><br />
<div style="background: white; border: solid #E3E3E3 1.0pt; mso-border-alt: solid #E3E3E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;">
<p class="MsoNormal" style="background: white; border: none; line-height: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #E3E3E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;"><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span><span style="color: #0d0d0d; font-family: "Segoe UI", sans-serif; font-size: 12pt;"><b>Validation and Verification</b>: Before proceeding with
any further actions, thorough validation and verification on the archival
server are imperative. Confirm that the imported data aligns with expectations
and meets the archival requirements. This step ensures the integrity of the
data before any modifications on the production database.</span></p>
<p class="MsoNormal" style="background: white; border: none; line-height: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #E3E3E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;"><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"><b>Deleting Records from Production - A Step Towards
Optimization</b>: Once the archival server data is validated, the next step involves
responsibly deleting records from the production database. The provided
deletion script targets the specified table (</span><b><span style="border: solid #E3E3E3 1.0pt; color: #0d0d0d; font-family: "Ubuntu Mono"; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid #E3E3E3 .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none; padding: 0cm;">TABLENAME</span></b><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;">) based on a conditional criterion involving the primary key (</span><b><span style="border: solid #E3E3E3 1.0pt; color: #0d0d0d; font-family: "Ubuntu Mono"; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid #E3E3E3 .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none; padding: 0cm;">primaryKey_id</span></b><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;">) and a creation date constraint.</span><span style="color: #0d0d0d; font-family: "Segoe UI", sans-serif; font-size: 12pt;"> </span></p><div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1pt solid rgb(227, 227, 227); padding: 0cm;">
<p class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: normal; margin-bottom: 15pt; padding: 0cm;"><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;">In the production database,
execute the following query:<o:p></o:p></span></p>
</div><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody><tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 462.1pt;" valign="top" width="616">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 15.0pt;"><span style="font-family: "Segoe UI", sans-serif; font-size: 12pt;"><span style="color: #2b00fe;">SELECT primary_key_id FROM TABLENAME WHERE
DATE(created_on) < '2022-01-01';</span><span style="color: #0d0d0d;"><o:p></o:p></span></span></p>
</td>
</tr>
</tbody></table><div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1pt solid rgb(227, 227, 227); padding: 0cm;">
<p class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: normal; margin-bottom: 15pt; padding: 0cm;"><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"> </span><span style="color: #0d0d0d; font-family: "Segoe UI", sans-serif; font-size: 12pt;">Copy the results of the query to Notepad++ and
perform the following find-and-replace steps after removal of appropriate keywords to get the respective scripts:</span></p>
</div><div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1pt solid rgb(227, 227, 227); margin-left: 18pt; margin-right: 0cm; padding: 0cm 0cm 0cm 5pt;">
<ol start="1" style="margin-top: 0cm;" type="1">
<li class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; color: #0d0d0d; line-height: normal; margin-bottom: 0cm; margin-left: 18pt; padding: 0cm;"><span style="font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;">Press
CTRL+H.<o:p></o:p></span></li>
<li class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; color: #0d0d0d; line-height: normal; margin-bottom: 0cm; margin-left: 18pt; padding: 0cm;"><span style="font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;">Enter </span><b><span style="border: solid #E3E3E3 1.0pt; font-family: "Ubuntu Mono"; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid #E3E3E3 .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none; padding: 0cm;">^</span></b><span style="font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"> in the "Find what" field.<o:p></o:p></span></li>
<li class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; color: #0d0d0d; line-height: normal; margin-bottom: 0cm; margin-left: 18pt; padding: 0cm;"><span style="font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;">Enter </span><b><span style="border: solid #E3E3E3 1.0pt; font-family: "Ubuntu Mono"; font-size: 10.5pt; mso-bidi-font-family: "Courier New"; mso-border-alt: solid #E3E3E3 .25pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none; padding: 0cm;">Delete FROM TABLENAME WHERE
primaryKey_id =</span></b><span style="font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"> in the "Replace with" field.<o:p></o:p></span></li>
<li class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; color: #0d0d0d; line-height: normal; margin-bottom: 0cm; margin-left: 18pt; padding: 0cm;"><span style="font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;">Choose
".Regular expression".<o:p></o:p></span></li>
<li class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; color: #0d0d0d; line-height: normal; margin-bottom: 0cm; margin-left: 18pt; padding: 0cm;"><span style="font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;">Click "Replace
ALL".<o:p></o:p></span></li>
</ol>
</div><p class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: normal; margin: 15pt 0cm; padding: 0cm;">
</p><div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1pt solid rgb(227, 227, 227); padding: 0cm;">
<p class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; line-height: normal; margin: 15pt 0cm 0cm; padding: 0cm;"><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;">After completing these steps in Notepad++, you can
run the delete scripts using a batch approach rather than executing all of them
at once. This ensures a more controlled and manageable process.<o:p></o:p></span></p>
</div>
</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody><tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 462.1pt;" valign="top" width="616">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt;"><span style="font-family: "Segoe UI", sans-serif; font-size: 12pt;"><span style="color: #2b00fe;">DELETE FROM TABLENAME WHERE primaryKey_id = values AND
DATE(created_on) < '2022-01-01';</span><span style="color: #0d0d0d;"><o:p></o:p></span></span></p>
</td>
</tr>
</tbody></table>
<div style="background: white; border: solid #E3E3E3 1.0pt; mso-border-alt: solid #E3E3E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;">
<p class="MsoNormal" style="background: white; border: none; line-height: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #E3E3E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;"><span style="color: #0d0d0d; font-family: "Segoe UI",sans-serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p><b> </b></o:p></span><span style="color: #0d0d0d; font-family: "Segoe UI", sans-serif; font-size: 12pt;"><b>Collaboration with Application Team</b>: It is crucial
to collaborate closely with the application team before executing any deletion
scripts. Ensuring concurrence and alignment with business requirements
minimizes the risk of unintentional data loss and guarantees a smooth
transition to an optimized production database.</span></p><p class="MsoNormal" style="background: white; border: none; line-height: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #E3E3E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;"><span style="color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; white-space-collapse: preserve;">Here are essential considerations both before and after executing delete operations in a production database as part of the archival process.</span></p><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;"><b>Before Deletion:</b></p><ol style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; counter-reset: list-number 0; display: flex; flex-direction: column; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; list-style: none; margin: 1.25em 0px; padding: 0px; white-space-collapse: preserve;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;"><span style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: var(--tw-prose-bold); margin-bottom: 1.25em; margin-top: 1.25em;"><b>Timing Matters:</b></span>
Schedule delete operations during off-business hours to minimize the impact on ongoing operations. This ensures that the deletion process does not interfere with critical business activities and guarantees a smoother transition.</li></ol><div><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;"><b>After Deletion:</b></p><ol style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; counter-reset: list-number 0; display: flex; flex-direction: column; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; list-style: none; margin: 1.25em 0px; padding: 0px; white-space-collapse: preserve;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; margin: 0px;"><span style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;">Table Defragmentation and Rebuilding:</span>
Following the deletion of significant amounts of data, it's essential to reclaim the space and optimize table performance. Execute the following SQL command during off-business hours to defragment and rebuild tables:</p></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; margin: 0px;"><br /></p></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;"><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody><tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 196.8pt;" valign="top" width="262">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm;"><span style="color: #2b00fe;">ALTER TABLE
tablename ENGINE=InnoDB;</span><o:p></o:p></p>
</td>
</tr>
</tbody></table></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;"><ol style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; counter-reset: list-number 0; display: flex; flex-direction: column; list-style: none; margin: 1.25em 0px; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; margin: 0px;">This command helps reclaim the deleted space within the table, optimizing storage on the underlying drive.</p></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; margin: 0px;"><br /></p></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; margin: 0px;"><span style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: var(--tw-prose-bold);"><b>Monitor Binary Log Files:</b></span>
Keep a close eye on the growth of binary log files, especially in production and any relevant slave database servers. Monitoring and managing binary logs are crucial for maintaining database integrity and preventing potential issues related to file size and storage.</p><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; margin: 0px;">Regularly purge old binary log files using the following MySQL commands:</p></li></ol></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;"><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody><tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 274.75pt;" valign="top" width="366">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm;"><span style="color: #2b00fe;">PURGE BINARY
LOGS BEFORE 'yyyy-mm-dd hh:mm:ss';</span><o:p></o:p></p>
</td>
</tr>
</tbody></table><span style="color: #0d0d0d;"><br /></span></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;">This helps manage the size of binary logs and prevents unnecessary disk space consumption.
</li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;"><ol style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; counter-reset: list-number 0; display: flex; flex-direction: column; list-style: none; margin: 1.25em 0px; padding: 0px;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; margin: 0px;"><span style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;">Rebuilding Tables with Partitions:</span>
If the deleted table has partitions, a specialized approach is required to rebuild the tables effectively. Identify the partition name using the following command:</p></li></ol><table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody><tr style="height: 20.65pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; height: 20.65pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 167.55pt;" valign="top" width="223">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm;"><span style="color: #2b00fe;">SHOW CREATE
TABLE tablename;</span><o:p></o:p></p>
</td>
</tr>
</tbody></table><span style="color: #0d0d0d;">
Once you have the partition name, use the following SQL command to rebuild the table:</span></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;">
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody><tr style="height: 17.3pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid windowtext 1.0pt; height: 17.3pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 300.55pt;" valign="top" width="401">
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm;"><span style="color: #2b00fe;">ALTER TABLE
tablename REBUILD PARTITION partition_name;</span><o:p></o:p></p>
</td>
</tr>
</tbody></table>
<p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; margin: 0px 0px 1.25em;"><b>Conclusion</b>:
In this comprehensive guide, we've explored a structured approach to exporting, importing, and pruning MySQL tables for effective data archiving. By following these steps meticulously, database administrators can maintain a well-organized, efficient database environment while preserving data integrity throughout the process. This step is particularly crucial for maintaining optimal performance, especially when dealing with partitioned tables.</p><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; margin: 1.25em 0px 0px;">Effectively managing data in a production database requires a meticulous approach to deletion processes. By considering the timing of deletions, implementing post-deletion optimization strategies, and monitoring critical aspects like binary logs and partitions, database administrators can ensure a seamless archival process without compromising data integrity or system performance. Adopting these best practices contributes to a well-maintained and optimized database environment.</p></li></ol></div>
</div>
<p class="MsoNormal"><o:p> </o:p></p></div>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-19657895472101109982023-05-09T04:54:00.002-07:002023-05-09T04:54:54.339-07:00MYSQL::Activate Slave server Again to sync with existing Master::Cluster Dissolve::Windows<p><b><u>Scenario:</u></b> Activating
existing slave again to sync with master server after cluster dissolved task happened
in the master servers (group replication Innodb Cluster).</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><b><u>Steps:</u></b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">1.Stop
slave to ensure no process to master server.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">mysql><span style="color: #2b00fe;">
STOP SLAVE;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">The STOP
SLAVE command in MySQL is used to stop the slave replication process on a slave
server in a master-slave replication setup. When executed on the slave server,
it halts the replication process and stops the slave from applying any new
changes received from the master.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Query OK, 0
rows affected, 1 warning (0.00 sec)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">2.Change
master command to set the new master server ip and credentials details.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span>mysql>
<span style="color: #2b00fe;">CHANGE MASTER TO MASTER_HOST='MASTERDBSERVERIP', MASTER_PORT=3306,
MASTER_USER='db_repl',</span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="color: #2b00fe;"><span style="mso-spacerun: yes;"> </span>-><span style="mso-spacerun: yes;">
</span>MASTER_PASSWORD='Password',MASTER_DELAY = 0,MASTER_AUTO_POSITION=1;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Query OK, 0
rows affected, 1 warning (0.05 sec)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span>The CHANGE
MASTER TO command in MySQL is used on a slave server in a master-slave
replication setup to configure and change the replication settings. It is used
to specify the master server's connection details and position from which the
slave should start replicating.</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">3.Then
start slave to sync master copy to slave.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">mysql>
<span style="color: #2b00fe;">START SLAVE;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Query OK, 0
rows affected (0.00 sec)<o:p></o:p></span></p>
<p class="MsoNormal">The START
SLAVE command in MySQL is used to start the replication process on a slave
server in a master-slave replication setup. When executed on the slave server,
it initiates the connection to the master server and begins replicating the
changes received from the master.</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">4.Check
show slave status results.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p>The SHOW SLAVE STATUS command in MySQL is used to display detailed information about the current status of a slave server in a master-slave replication setup. When executed on the slave server, it provides a comprehensive overview of the slave's replication state and configuration.</o:p></span></p><p class="MsoNormal">mysql> <span style="color: #2b00fe;">show slave status \G;</span></p><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">*************************** 1. row ***************************<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Slave_IO_State: Waiting for master to send event<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_Host: MASTERDBSERVERIP<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_User: db_repl<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_Port: 3306<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Connect_Retry: 60<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_Log_File: MASTERDBSERVERNAME-bin.001763<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Read_Master_Log_Pos: 843694033<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Relay_Log_File: SLAVEDBSERVERNAME-relay-bin.000002<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Relay_Log_Pos: 10832949<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Relay_Master_Log_File: MASTERDBSERVERNAME-bin.001763<o:p></o:p></p>
<p class="MsoNormal"> <span style="color: #2b00fe;">
</span><span style="color: #2b00fe;">Slave_IO_Running: Yes<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: #2b00fe;"><span style="mso-spacerun: yes;">
</span>Slave_SQL_Running: Yes</span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Replicate_Do_DB:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Replicate_Ignore_DB:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Replicate_Do_Table:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Replicate_Ignore_Table:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Replicate_Wild_Do_Table:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Replicate_Wild_Ignore_Table:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Last_Errno: 0<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Last_Error:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Skip_Counter: 0<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Exec_Master_Log_Pos: 843694033<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Relay_Log_Space: 10833158<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Until_Condition: None<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Until_Log_File:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>Until_Log_Pos: 0<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_SSL_Allowed: No<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_SSL_CA_File:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_SSL_CA_Path:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_SSL_Cert:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_SSL_Cipher:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_SSL_Key:<o:p></o:p></p>
<p class="MsoNormal"> <span style="color: #2b00fe;">
</span><span style="color: #2b00fe;">Seconds_Behind_Master: 0</span><o:p></o:p></p>
<p class="MsoNormal">Master_SSL_Verify_Server_Cert: No<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Last_IO_Errno: 0<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Last_IO_Error:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Last_SQL_Errno: 0<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Last_SQL_Error:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Replicate_Ignore_Server_Ids:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_Server_Id: 13<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_UUID: 08538d8c-ed98-11ea-852d-005056844240<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_Info_File: mysql.slave_master_info<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>SQL_Delay: 0<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>SQL_Remaining_Delay: NULL<o:p></o:p></p>
<p class="MsoNormal"><span style="color: #2b00fe;"><span style="mso-spacerun: yes;">
</span>Slave_SQL_Running_State: Slave has read all relay log; waiting for more
updates</span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_Retry_Count: 86400<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_Bind:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Last_IO_Error_Timestamp:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Last_SQL_Error_Timestamp:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_SSL_Crl:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>Master_SSL_Crlpath:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Retrieved_Gtid_Set: 08538d8c-ed98-11ea-852d-005056844240:942835-942878<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Executed_Gtid_Set: 08538d8c-ed98-11ea-852d-005056844240:1-942878,<o:p></o:p></p>
<p class="MsoNormal">28179efb-72c5-11e4-b496-0050569242d9:1-13995703,<o:p></o:p></p>
<p class="MsoNormal">29a42f08-7c8e-11ed-969f-005056846111:1-69949262:70421923-70422753,<o:p></o:p></p>
<p class="MsoNormal">329fcb1a-c0dd-11eb-82b1-005056847352:1-66160,<o:p></o:p></p>
<p class="MsoNormal">6a6ae23d-183f-11eb-ae83-005056846111:1-114606407:114931406-114935574,<o:p></o:p></p>
<p class="MsoNormal">ae4d4435-ecbc-11ea-a835-0050568415e0:1-348529,<o:p></o:p></p>
<p class="MsoNormal">d1f71bf8-c0dd-11eb-82b1-005056847352:1-258121803,<o:p></o:p></p>
<p class="MsoNormal">d9014b6b-1812-11eb-976b-005056846111:1-292573,<o:p></o:p></p>
<p class="MsoNormal">dfc8fe40-336a-11ed-a8ea-005056847352:1-48770981<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Auto_Position: 1<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Replicate_Rewrite_DB:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Channel_Name:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_TLS_Version:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Master_public_key_path:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>Get_master_public_key: 0<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-spacerun: yes;">
</span>Network_Namespace:<o:p></o:p></p>
<p class="MsoNormal">1 row in set (0.00 sec)<o:p></o:p></p><p class="MsoNormal"><b><u>Interpret the Output:</u></b> The SHOW SLAVE STATUS command provides a result set with various columns containing information about the replication status. Some of the important columns and their meanings include:</p><p class="MsoNormal"></p><ol style="text-align: left;"><li>Slave_IO_State: The current state of the slave I/O thread.</li><li>Master_Host and Master_Port: The hostname and port of the master server.</li><li>Slave_IO_Running and Slave_SQL_Running: Whether the slave I/O thread and slave SQL thread are running (Yes) or stopped (No).</li><li>Seconds_Behind_Master: The replication lag in seconds, indicating how far behind the slave is compared to the master.</li><li>Last_Error: Any error message related to replication.</li><li>Master_Log_File and Read_Master_Log_Pos: The binary log file and position from which the slave is currently reading.</li><li>Relay_Log_File and Relay_Log_Pos: The relay log file and position, indicating the last processed event on the slave.</li><li>Exec_Master_Log_Pos: The position of the last executed event on the slave.</li></ol><p></p><p class="MsoNormal">These columns provide insights into the replication status, lag, error messages, and positions within the replication process.</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span></p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-63853548619731074342023-05-09T04:32:00.001-07:002023-05-09T04:32:06.326-07:00MYSQL::Audit Requirement:: Keyring file rotation in MYSQL windows ::Master -SLave<p> MYSQL::Audit Requirement:: Keyring file rotation in MYSQL windows ::Master -Slave</p><p>The <span style="color: #2b00fe;">ALTER INSTANCE ROTATE INNODB MASTER KEY</span> statement in MySQL is used to rotate the master key for InnoDB tablespace encryption in a master-slave replication setup. This statement is specific to the InnoDB storage engine and is used when you have enabled encryption for InnoDB tablespaces using the keyring plugin.</p><p>Note down the keyring file timestamp before rotation.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrQBYsBmCGolqTqDZAmVb04cN6NcAlmlctBTSbYMBbuLt7HKD3vKKRR5Pyj3OOhMXfBZoLyuAJ8WP_CKTNvqWOOyrqd7GcUxSAOtrQxu5V1K7qt6IJaThBujTfo2J1Y1rMRD89rIXUHuUVcHaOkW2apMhLkZxmgc46iTCSRfhrusccQZ1Bl-zsIgF1/s655/Image%200.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="166" data-original-width="655" height="81" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrQBYsBmCGolqTqDZAmVb04cN6NcAlmlctBTSbYMBbuLt7HKD3vKKRR5Pyj3OOhMXfBZoLyuAJ8WP_CKTNvqWOOyrqd7GcUxSAOtrQxu5V1K7qt6IJaThBujTfo2J1Y1rMRD89rIXUHuUVcHaOkW2apMhLkZxmgc46iTCSRfhrusccQZ1Bl-zsIgF1/s320/Image%200.JPG" width="320" /></a></div><br /><p><br /></p><p>When you execute the ALTER INSTANCE ROTATE INNODB MASTER KEY statement on the master server, it performs the following actions:</p><p><br /></p><p>Generates a new master key: The statement generates a new master key for InnoDB tablespace encryption. The master key is used to encrypt and decrypt the InnoDB tablespaces.</p><p><br /></p><p>Encrypts new data with the new master key: After generating the new master key, the statement starts encrypting new data that is written to the InnoDB tablespaces using the new key.</p><p><br /></p><p>Re-encrypts existing data: The statement also initiates a background process that gradually re-encrypts existing data in the InnoDB tablespaces using the new master key. This process ensures that all data is eventually re-encrypted with the new key.</p><p><br /></p><p>Synchronizes key rotation with replication: The ALTER INSTANCE ROTATE INNODB MASTER KEY statement ensures that the rotation of the master key is synchronized with the replication process in a master-slave setup. It ensures that the new key and the re-encryption process are propagated to the slave servers, allowing them to use the new master key for decryption.</p><p>Need to execute this command in master server only.</p><p>mysql><span style="color: #2b00fe;">ALTER INSTANCE ROTATE INNODB MASTER KEY;</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGBwJpcNyqX-eYEQDucNbOQZb_gPa8Ni4B1kZvHswK7_oA8iukNqNVl7NOE7fku_USckSqneksbUhNv8hcMHOJJQkyQvCX8_Wpmrkvnch-sPBJjLVii48tPhsbpkPqpRBgtdK4a4_W-BvK0sU2bg1scc3bK3orJaA9rcaemdQT5KtzuHwxmVe8ceTQ/s518/Image%201.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="224" data-original-width="518" height="138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGBwJpcNyqX-eYEQDucNbOQZb_gPa8Ni4B1kZvHswK7_oA8iukNqNVl7NOE7fku_USckSqneksbUhNv8hcMHOJJQkyQvCX8_Wpmrkvnch-sPBJjLVii48tPhsbpkPqpRBgtdK4a4_W-BvK0sU2bg1scc3bK3orJaA9rcaemdQT5KtzuHwxmVe8ceTQ/s320/Image%201.JPG" width="320" /></a></div><br /><p><br /></p><p>By rotating the InnoDB master key, you enhance the security of your encrypted data by periodically changing the encryption key. This helps protect against potential security threats or key exposure.</p><p>Note down the keyring file timestamp after rotation to check latest timestamp come.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpmmBRWG0eLyHycbOhW5wh8aMlUVFl4WxnmCxZKFNAwqNWX52gIUOKeyxZgsUXlA2yxtQrOh-ptqoSk6AyerU7VCy0w7LWcMKc9QZBW3xL7S4wq9Qf2hcIvUDJCN9jxzIXNloRHWtyQBSQ3mstxOmqpsa8AaXYUrjhuX0F2LubIznXLCCY0udAuGPn/s843/Image%202.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="196" data-original-width="843" height="74" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpmmBRWG0eLyHycbOhW5wh8aMlUVFl4WxnmCxZKFNAwqNWX52gIUOKeyxZgsUXlA2yxtQrOh-ptqoSk6AyerU7VCy0w7LWcMKc9QZBW3xL7S4wq9Qf2hcIvUDJCN9jxzIXNloRHWtyQBSQ3mstxOmqpsa8AaXYUrjhuX0F2LubIznXLCCY0udAuGPn/w320-h74/Image%202.JPG" width="320" /></a></div><br /><p><br /></p><p>It's important to note that this statement should be executed on the master server in a master-slave replication setup, and the key rotation and re-encryption process will be automatically propagated to the slave servers.</p><p><u><b>Note: </b></u>These steps can be used in Innodb Cluster group replication also. For 4TB database, it took less than 10 seconds only.</p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-15928800828156397842023-05-09T04:16:00.004-07:002023-05-09T04:16:42.320-07:00MYSQL::Enterprise backup getting failed after cluster dissolve::<p><b><u>Error</u>: </b>ERROR: Unexpected number of rows from MySQL query 'SELECT member_role FROM performance_schema.replication_group_members WHERE member_id=@@server_uuid': got 0, expected == 1.</p><p>Anyone experienced this error. MySQL enterprise full backup, differential and incremental backup having this error in the backup log. Please advise any to need to be taken or can we ignore.</p><p>=========================================================================</p><p>230507 15:35:23 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>230507 15:35:23 MAIN INFO: Group replication setup detected.</p><p>230507 15:35:23 MAIN ERROR: Unexpected number of rows from MySQL query 'SELECT member_role FROM performance_schema.replication_group_members WHERE member_id=@@server_uuid': got 0, expected == 1.</p><p>230507 15:35:23 MAIN WARNING: This backup operation cannot update the backup_history table.</p><p>230507 15:35:23 MAIN INFO: Full Image Backup operation completed successfully.</p><p>230507 15:35:23 MAIN INFO: Backup image created successfully.</p><p>230507 15:35:23 MAIN INFO: Image Path = Z:\DBNAME_PROD_WEEKLY_FULL_BKP\FULL_20230605_220000.img</p><p>230507 15:35:23 MAIN INFO: MySQL binlog position: filename SERVERNAME-bin.001803, position 136791673</p><p>230507 15:35:23 MAIN INFO: GTID_EXECUTED is 08538d8c-ed98-11ea-852d-005056844240:1-1658361,28179efb-72c5-11e4-b496-0050569242d9:1-13995703,29a42f08-7c8e-11ed-969f-005056846111:1-69949262:70421923-70422753,329fcb1a-c0dd-11eb-82b1-005056847352:1-66160,6a6ae23d-183f-11eb-ae83-005056846111:1-114606407:114931406-114935574,ae4d4435-ecbc-11ea-a835-0050568415e0:1-348529,d1f71bf8-c0dd-11eb-82b1-005056847352:1-258121803,d9014b6b-1812-11eb-976b-005056846111:1-292573,dfc8fe40-336a-11ed-a8ea-005056847352:1-48770981</p><p>-------------------------------------------------------------</p><p> Parameters Summary </p><p>-------------------------------------------------------------</p><p> Start LSN : 13530353956352</p><p> End LSN : 13531799802630</p><p>-------------------------------------------------------------</p><p>mysqlbackup completed OK! with 2 warnings</p><p>=========================================================================</p><p><b><u>Solution:</u></b></p><p><br /></p><p>mysql> <span style="color: #2b00fe;">SELECT * FROM performance_schema.replication_group_members;</span></p><p>+---------------------------+-----------+-------------+-------------+--------------+-------------+----------------+</p><p>| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION |</p><p>+---------------------------+-----------+-------------+-------------+--------------+-------------+----------------+</p><p>| group_replication_applier | | | NULL | OFFLINE | | |</p><p>+---------------------------+-----------+-------------+-------------+--------------+-------------+----------------+</p><p>1 row in set (0.00 sec)</p><p><br /></p><p>UNINSTALL PLUGIN GROUP_REPLICATION;</p><p>=================================================================</p><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #f7f7f8; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin: 0px 0px 1.25em; white-space: pre-wrap;">The <code style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-code); font-family: "Söhne Mono", Monaco, "Andale Mono", "Ubuntu Mono", monospace !important; font-size: 0.875em; font-weight: 600;">UNINSTALL PLUGIN GROUP_REPLICATION;</code> command is used in MySQL to uninstall or remove the Group Replication plugin. Group Replication is a MySQL plugin that enables you to create a highly available replication group of MySQL servers. It provides a multi-master replication solution with automatic conflict detection and resolution.</p><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #f7f7f8; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin: 1.25em 0px; white-space: pre-wrap;">When you execute the <code style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-code); font-family: "Söhne Mono", Monaco, "Andale Mono", "Ubuntu Mono", monospace !important; font-size: 0.875em; font-weight: 600;">UNINSTALL PLUGIN GROUP_REPLICATION;</code> command, it removes the Group Replication plugin from the MySQL server. This means that the server will no longer participate in a Group Replication setup and will not be part of a replication group.</p><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #f7f7f8; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin: 1.25em 0px; white-space: pre-wrap;">======================================================</p><p>mysql><span style="color: #2b00fe;"> uninstall plugin group_replication;</span></p><p>ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option so it cannot execute this statement</p><p>mysql> s<span style="color: #2b00fe;">et global super_read_only=0;</span></p><p> Query OK, 0 rows affected (0.00 sec)</p><p>mysql><span style="color: #2b00fe;"> uninstall plugin group_replication;</span></p><p>Query OK, 0 rows affected (0.03 sec)</p><p>mysql> <span style="color: #2b00fe;">set global super_read_only=1;</span></p><p>Query OK, 0 rows affected (0.00 sec)</p><p>Then backup task started to run successfully.</p><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; margin: 1.25em 0px; white-space: pre-wrap;"><span style="background-color: #f7f7f8;">Here are a few things to keep in mind when using the <code style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-code); font-family: "Söhne Mono", Monaco, "Andale Mono", "Ubuntu Mono", monospace !important; font-size: 0.875em; font-weight: 600;">UNINSTALL PLUGIN GROUP_REPLICATION;</code> command:</span></p><ol style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #374151; counter-reset: item 0; display: flex; flex-direction: column; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 1.25em 0px; padding: 0px 0px 0px 1rem; white-space: pre-wrap;"><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px; padding-left: 0.375em;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span style="background-color: #f7f7f8;">Replication Group: Before uninstalling the Group Replication plugin, ensure that the server you're uninstalling from is not an essential member of the replication group. Otherwise, removing the plugin from a member server can disrupt the replication group's functionality.</span></p></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px; padding-left: 0.375em;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span style="background-color: #f7f7f8;">Backup: Make sure you have a backup of your data or a plan in place to ensure data availability during the uninstallation process. Removing the plugin doesn't affect the data stored on the server, but it's always a good practice to have backups in case of any unexpected issues.</span></p></li><li style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px; padding-left: 0.375em;"><p style="--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;"><span style="background-color: #f7f7f8;">Impact: Uninstalling the Group Replication plugin only affects the specific server where the command is executed. Other servers in the replication group will continue functioning as long as they still have the plugin installed and configured.</span></p></li></ol>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-13043657563597710302023-04-13T04:43:00.002-07:002023-04-13T04:43:16.462-07:00MYSQL:: Cluster dissolve Required to reduce cost # to Standalone MYSQL Instance<p> MYSQL:: Cluster dissolve Required to reduce cost # to Standalone MYSQL Instance:</p><p><b>Scenario:</b></p><p><span style="color: #2b00fe;">To dissolve the mysql innodbcluster, Need to connect primary node and then ensure all members in ONLINE state. </span></p><p><span style="color: #2b00fe;">Then run cluster.dissolve()</span></p><p><span style="color: #2b00fe;">Next run <span lang="EN-US" style="font-family: "Courier New"; font-size: 10pt;">SET</span><span lang="EN-US" style="font-family: "Courier New"; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Courier New"; font-size: 10pt;">GLOBAL</span><span lang="EN-US" style="font-family: "Courier New"; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Courier New"; font-size: 10pt;">read_only</span><span lang="EN-US" style="font-family: "Courier New"; font-size: 10pt;">=</span><span lang="EN-US" style="font-family: "Courier New"; font-size: 10pt;">0</span><span lang="EN-US" style="font-family: "Courier New"; font-size: 10pt;">; to make standalone node from readonly to read write.</span></span></p><p><span style="color: #2b00fe;"><span lang="EN-US" style="font-family: "Courier New"; font-size: 10pt;">Then Ask application team to connect without Mysql Router by direct ip address and port number.</span></span></p><p></p><p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">=========================================================================</span></p><p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">At one of
the node in Cluster:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Type
'\help' or '\?' for help; '\quit' to exit.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>MySQL<span style="mso-spacerun: yes;">
</span>JS > \c clusteradmin@PRIMARYNODE_IP:3306<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Creating a
session to 'clusteradmin@PRIMARYNODE_IP:3306'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Fetching
schema names for autocompletion... Press ^C to stop.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Your MySQL
connection id is 4592901<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Server
version: 8.0.20-commercial MySQL Enterprise Server - Commercial<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">No default
schema selected; type \use <schema> to set one.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>MySQL<span style="mso-spacerun: yes;"> </span>PRIMARYNODE_IP:3306
ssl<span style="mso-spacerun: yes;"> </span>JS > var
cluster=dba.getCluster();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>MySQL<span style="mso-spacerun: yes;"> </span>PRIMARYNODE_IP:3306
ssl<span style="mso-spacerun: yes;"> </span>JS > cluster.status();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"clusterName":
"uatcluster",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"defaultReplicaSet": {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"name": "default",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"primary": "SECONDARYNODE_IP1:3306",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"ssl": "REQUIRED",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"status": "OK",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"statusText": "Cluster
is ONLINE and can tolerate up to ONE failure.",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"topology": {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"PRIMARYNODE_IP:3306": {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>"address": "PRIMARYNODE_IP:3306",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"mode":
"R/O",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"readReplicas": {},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"replicationLag":
null,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"role":
"HA",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"status":
"ONLINE",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"version":
"8.0.20"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;">
</span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"SECONDARYNODE_IP1:3306":
{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"address": "SECONDARYNODE_IP1:3306",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"mode":
"R/W",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"readReplicas": {},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"replicationLag":
null,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"role":
"HA",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"status":
"ONLINE",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"version":
"8.0.20"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"SECONDARYNODE_IP1:3306":
{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"address": "SECONDARYNODE_IP1:3306",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"mode":
"R/O",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"readReplicas": {},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"replicationLag":
null,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"role":
"HA",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"status":
"ONLINE",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"version":
"8.0.20"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"topologyMode":
"Single-Primary"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"groupInformationSourceMember":
"SECONDARYNODE_IP1:3306"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>MySQL<span style="mso-spacerun: yes;"> </span>PRIMARYNODE_IP:3306
ssl<span style="mso-spacerun: yes;"> </span>JS ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="mso-ansi-language: EN-US;">Steps
done:<o:p></o:p></span></b></p><p class="MsoNormal"><b><span lang="EN-US" style="mso-ansi-language: EN-US;"><br /></span></b></p><p class="MsoNormal">================================================================</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">MySQL<span style="mso-spacerun: yes;"> </span>PRIMARYNODE_IP:3306 ssl<span style="mso-spacerun: yes;"> </span>JS > <span style="background: lime; mso-highlight: lime;">cluster.setPrimaryInstance('Clusteradmin@PRIMARYNODE_IP:3306');</span><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Setting
instance 'PRIMARYNODE_IP:3306' as the primary instance of cluster
'uatcluster'...<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Instance 'SECONDARYNODE_IP1:3306'
was switched from PRIMARY to SECONDARY.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Instance 'SECONDARYNODE_IP1:3306'
remains SECONDARY.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Instance 'PRIMARYNODE_IP:3306'
was switched from SECONDARY to PRIMARY.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">WARNING:
The cluster internal session is not the primary member anymore. For cluster
management operations please obtain a fresh cluster handle using
dba.getCluster().<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">The
instance 'PRIMARYNODE_IP:3306' was successfully elected as primary.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span></span>================================================================</p><p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">MySQL<span style="mso-spacerun: yes;"> </span>PRIMARYNODE_IP:3306
ssl<span style="mso-spacerun: yes;"> </span>JS ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Noting down
the cluster option as well for reference.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">MySQL<span style="mso-spacerun: yes;"> </span>PRIMARYNODE_IP:3306 ssl<span style="mso-spacerun: yes;"> </span>JS > cluster.options();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"clusterName":
"uatcluster",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"defaultReplicaSet": {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"globalOptions": [<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"groupName",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"175f7950-4ac8-11ed-893f-00505684085f",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_group_name"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"memberSslMode",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"REQUIRED",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_ssl_mode"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"disableClone",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value": false<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>],<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"topology": {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"PRIMARYNODE_IP:3306": [<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"autoRejoinTries",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value": "0",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_autorejoin_tries"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"consistency",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"EVENTUAL",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_consistency"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"exitStateAction",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"READ_ONLY",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_exit_state_action"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"expelTimeout",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"0",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_member_expel_timeout"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"groupSeeds",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value": "SECONDARYNODE_IP1:33061,SECONDARYNODE_IP1:33061",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_group_seeds"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"ipWhitelist",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>"value": "AUTOMATIC",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_ip_whitelist"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"localAddress",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value": "PRIMARYNODE_IP:33061",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_local_address"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"memberWeight",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"50",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_member_weight"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>],<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"SECONDARYNODE_IP1:3306":
[<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"autoRejoinTries",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"0",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_autorejoin_tries"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"consistency",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"EVENTUAL",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_consistency"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>"option":
"exitStateAction",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"READ_ONLY",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_exit_state_action"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"expelTimeout",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>"value": "0",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_member_expel_timeout"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"groupSeeds",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value": "PRIMARYNODE_IP:33061,SECONDARYNODE_IP1:33061",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_group_seeds"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"ipWhitelist",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"AUTOMATIC",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_ip_whitelist"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"localAddress",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value": "SECONDARYNODE_IP1:33061",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_local_address"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"memberWeight",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"50",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_member_weight"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>],<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"SECONDARYNODE_IP1:3306":
[<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"autoRejoinTries",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"0",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_autorejoin_tries"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"consistency",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"EVENTUAL",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_consistency"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"exitStateAction",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"READ_ONLY",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_exit_state_action"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"expelTimeout",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"0",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_member_expel_timeout"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"groupSeeds",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value": "SECONDARYNODE_IP1:33061,PRIMARYNODE_IP:33061,SECONDARYNODE_IP1:33061",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_group_seeds"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"ipWhitelist",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"AUTOMATIC",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_ip_whitelist"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"localAddress",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value": "SECONDARYNODE_IP1:33061",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_local_address"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"option":
"memberWeight",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"value":
"50",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"variable":
"group_replication_member_weight"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>MySQL<span style="mso-spacerun: yes;"> </span>PRIMARYNODE_IP:3306
ssl<span style="mso-spacerun: yes;"> </span>JS ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span>================================================================</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="background: lime; mso-ansi-language: EN-US; mso-highlight: lime;">>>Ask System team to take VM snapshot of all
nodes for database cluster.</span><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span>================================================================</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">MySQL<span style="mso-spacerun: yes;"> </span>PRIMARYNODE_IP:3306 ssl<span style="mso-spacerun: yes;"> </span>JS > <span style="background: lime; mso-highlight: lime;">cluster.dissolve();</span><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Cluster.dissolve:
This function is not available through a session to a read only instance
(RuntimeError)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>MySQL<span style="mso-spacerun: yes;"> </span>PRIMARYNODE_IP:3306
ssl<span style="mso-spacerun: yes;"> </span>JS ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Then open
new MYSQL SHELL Windows and try to run same command,it works.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span>================================================================</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">MySQL<span style="mso-spacerun: yes;"> </span>PRIMARYNODE_IP1:3306 ssl<span style="mso-spacerun: yes;"> </span>JS > <span style="background: lime; mso-highlight: lime;">cluster.dissolve();</span><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">The cluster
still has the following registered instances:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"clusterName":
"uatcluster",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"defaultReplicaSet": {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"name": "default",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"topology": [<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"address": "PRIMARYNODE_IP1:3306",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"label": "PRIMARYNODE_IP1:3306",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"role":
"HA"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"address": "PRIMARYNODE_IP1:3306",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"label": "PRIMARYNODE_IP1:3306",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"role":
"HA"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>},<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"address": "SECONDARYNODE_IP1:3306",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"label": "SECONDARYNODE_IP1:3306",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"role":
"HA"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>],<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>"topologyMode":
"Single-Primary"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">WARNING:
You are about to dissolve the whole cluster and lose the high availability
features provided by it. This operation cannot be reverted. All members will be
removed from the cluster and replication will be stopped, internal recovery
user accounts and the cluster metadata will be dropped. User data will be maintained
intact in all instances.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Are you
sure you want to dissolve the cluster? [y/N]: y<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">NOTE: The
recovery user name for instance 'SECONDARYNODE_IP1:3306' does not match the
expected format for users created automatically by InnoDB Cluster. Skipping its
removal.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Instance 'PRIMARYNODE_IP1:3306'
is attempting to leave the cluster...<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Instance 'SECONDARYNODE_IP1:3306'
is attempting to leave the cluster...<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Instance 'PRIMARYNODE_IP1:3306'
is attempting to leave the cluster...<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span>The cluster
was successfully dissolved.</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Replication
was disabled but user data was left intact.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">================================================================</span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span> MySQL PRIMARYNODE_IP1:3306
ssl JS ></p>
<p class="MsoNormal"><b><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span></b><b><span lang="EN-US">CLUSTER
DISSOLVED.</span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span></b>MySQL PRIMARYNODE_IP1:3306 ssl JS > var cluster =dba.getCluster();</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Dba.getCluster:
This function is not available through a session to a standalone instance
(metadata exists, instance does not belong to that metadata, and GR is not
active) (RuntimeError)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>MySQL<span style="mso-spacerun: yes;"> </span>PRIMARYNODE_IP1:3306
ssl<span style="mso-spacerun: yes;"> </span>JS > cluster.status();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Cluster.status:
Can't call function 'status' on a dissolved cluster (RuntimeError)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="mso-spacerun: yes;"> </span>MySQL<span style="mso-spacerun: yes;"> </span>PRIMARYNODE_IP1:3306
ssl<span style="mso-spacerun: yes;"> </span>JS ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="background: lime; mso-ansi-language: EN-US; mso-highlight: lime;">LOOKS MYSQL STANDALONE INSTANCE BECOME READONLY AFTER
CLUSTER DISSOLVE.</span><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Before:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span>mysql>
SHOW GLOBAL VARIABLES LIKE '%read%';</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">+-----------------------------------------+---------------------------+<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
Variable_name<span style="mso-spacerun: yes;"> </span>|
Value<span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">+-----------------------------------------+---------------------------+<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
create_admin_listener_thread<span style="mso-spacerun: yes;"> </span>|
OFF<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_parallel_read_threads<span style="mso-spacerun: yes;"> </span>|
4<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_purge_threads<span style="mso-spacerun: yes;"> </span>|
4<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_random_read_ahead<span style="mso-spacerun: yes;"> </span>|
OFF<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_read_ahead_threshold<span style="mso-spacerun: yes;"> </span>|
56<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_read_io_threads<span style="mso-spacerun: yes;"> </span>|
4<span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_read_only<span style="mso-spacerun: yes;"> </span>|
OFF<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_thread_concurrency<span style="mso-spacerun: yes;"> </span>|
0<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_thread_sleep_delay<span style="mso-spacerun: yes;"> </span>|
10000<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_write_io_threads<span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>| 4<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
max_delayed_threads<span style="mso-spacerun: yes;"> </span>|
20<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
max_insert_delayed_threads<span style="mso-spacerun: yes;"> </span>|
20<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
myisam_repair_threads<span style="mso-spacerun: yes;"> </span>|
1<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
mysqlx_idle_worker_thread_timeout<span style="mso-spacerun: yes;"> </span>|
60<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
mysqlx_min_worker_threads<span style="mso-spacerun: yes;"> </span>|
2<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
mysqlx_read_timeout<span style="mso-spacerun: yes;"> </span>|
30<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
net_read_timeout<span style="mso-spacerun: yes;"> </span>|
30<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
performance_schema_max_thread_classes<span style="mso-spacerun: yes;"> </span>|
100<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
performance_schema_max_thread_instances | -1<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
read_buffer_size<span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>| 131072<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
read_only<span style="mso-spacerun: yes;"> </span>|
ON<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
read_rnd_buffer_size<span style="mso-spacerun: yes;"> </span>|
262144<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
rpl_read_size<span style="mso-spacerun: yes;"> </span>|
8192<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">| super_read_only<span style="mso-spacerun: yes;"> </span>| ON<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
thread_cache_size<span style="mso-spacerun: yes;"> </span>|
13<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
thread_handling<span style="mso-spacerun: yes;"> </span>|
one-thread-per-connection |<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
thread_stack<span style="mso-spacerun: yes;"> </span>|
286720<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
transaction_read_only<span style="mso-spacerun: yes;"> </span>|
OFF<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">+-----------------------------------------+---------------------------+<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">28 rows in
set (0.01 sec)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="background: lime; mso-ansi-language: EN-US; mso-highlight: lime;">Once we run the below in the standalone mysql instance
, database become read write mode to let users to connect and update.</span><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-ansi-language: EN-US;">SET</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10.0pt; mso-ansi-language: EN-US;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-ansi-language: EN-US;">GLOBAL</span></b><span lang="EN-US" style="color: black; font-family: "Courier New"; font-size: 10.0pt; mso-ansi-language: EN-US;"> </span><b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-ansi-language: EN-US;">read_only</span></b><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-ansi-language: EN-US;">=</span><span lang="EN-US" style="color: purple; font-family: "Courier New"; font-size: 10.0pt; mso-ansi-language: EN-US;">0</span><span lang="EN-US" style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-ansi-language: EN-US;">;<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><i><span lang="EN-US" style="color: grey; font-family: "Courier New"; font-size: 10.0pt; mso-ansi-language: EN-US;">/* Affected rows:
0<span style="mso-spacerun: yes;"> </span>Found rows: 0<span style="mso-spacerun: yes;"> </span>Warnings: 0<span style="mso-spacerun: yes;">
</span>Duration for 1 query: 0.000 sec. */<o:p></o:p></span></i></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span>AFTER:</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span>mysql>
SHOW GLOBAL VARIABLES LIKE '%read%';</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">+-----------------------------------------+---------------------------+<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
Variable_name<span style="mso-spacerun: yes;"> </span>|
Value<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">+-----------------------------------------+---------------------------+<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
create_admin_listener_thread<span style="mso-spacerun: yes;"> </span>|
OFF<span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_parallel_read_threads<span style="mso-spacerun: yes;"> </span>|
4<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_purge_threads<span style="mso-spacerun: yes;"> </span>|
4<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_random_read_ahead<span style="mso-spacerun: yes;"> </span>|
OFF<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_read_ahead_threshold<span style="mso-spacerun: yes;"> </span>|
56<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_read_io_threads<span style="mso-spacerun: yes;"> </span>|
4<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_read_only<span style="mso-spacerun: yes;"> </span>|
OFF<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_thread_concurrency<span style="mso-spacerun: yes;"> </span>|
0<span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_thread_sleep_delay<span style="mso-spacerun: yes;"> </span>|
10000<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
innodb_write_io_threads<span style="mso-spacerun: yes;"> </span>|
4<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
max_delayed_threads<span style="mso-spacerun: yes;"> </span>|
20<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
max_insert_delayed_threads<span style="mso-spacerun: yes;"> </span>|
20<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
myisam_repair_threads<span style="mso-spacerun: yes;"> </span>|
1<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
mysqlx_idle_worker_thread_timeout<span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>| 60<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
mysqlx_min_worker_threads<span style="mso-spacerun: yes;"> </span>|
2<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
mysqlx_read_timeout<span style="mso-spacerun: yes;"> </span>|
30<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
net_read_timeout<span style="mso-spacerun: yes;"> </span>|
30<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">| performance_schema_max_thread_classes<span style="mso-spacerun: yes;"> </span>| 100<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
performance_schema_max_thread_instances | -1<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
read_buffer_size<span style="mso-spacerun: yes;"> </span>|
131072<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
read_only<span style="mso-spacerun: yes;"> </span>|
OFF <span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
read_rnd_buffer_size<span style="mso-spacerun: yes;"> </span>|
262144<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
rpl_read_size<span style="mso-spacerun: yes;"> </span>|
8192<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
super_read_only<span style="mso-spacerun: yes;"> </span>|
OFF<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
thread_cache_size<span style="mso-spacerun: yes;"> </span>|
13<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
thread_handling<span style="mso-spacerun: yes;"> </span>|
one-thread-per-connection |<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
thread_stack<span style="mso-spacerun: yes;"> </span>|
286720<span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">|
transaction_read_only<span style="mso-spacerun: yes;"> </span>|
OFF<span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>|<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">+-----------------------------------------+---------------------------+<b><o:p></o:p></b></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p> </o:p></span></b></p><p></p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-40030716123748117102023-03-07T18:12:00.002-08:002023-03-07T18:12:18.369-08:00MYSQL:::: Primary node in missing state and other two nodes as in Quorum as one new node as primary.Steps to FIX.<p> Scenario: Node 3 is missing and looks in R\O mode from R\W mode and fixed this error after one day.</p><p><br /></p><p>Solution:</p><p><br /></p><p>When i try to join or remove instance node 3 or add instance node 3 to check,but it saying mysql gone away error. When i restart mysql services in the issue node 3. then the cluster status showing all good. </p><p><br /></p><p>================================================================================</p><p>Steps checked:</p><p><br /></p><p>MySQL DBCLUSTERNODEIP_3:3306 ssl JS > var cluster =dba.getCluster();</p><p>WARNING: Cluster has no quorum and cannot process write transactions: Group has no quorum</p><p> MySQL DBCLUSTERNODEIP_3:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "uatcluster",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "DBCLUSTERNODEIP_3:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "NO_QUORUM",</p><p> "statusText": "Cluster has no quorum as visible from 'DBCLUSTERNODEIP_3:3306' and cannot process write transactions. 2 members are not active",</p><p> "topology": {</p><p> "DBCLUSTERNODEIP_1:3306": {</p><p> "address": "DBCLUSTERNODEIP_1:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "role": "HA",</p><p> "status": "UNREACHABLE",</p><p> "version": "8.0.20"</p><p> },</p><p> "DBCLUSTERNODEIP_2:3306": {</p><p> "address": "DBCLUSTERNODEIP_2:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "role": "HA",</p><p> "status": "UNREACHABLE",</p><p> "version": "8.0.20"</p><p> },</p><p> "DBCLUSTERNODEIP_3:3306": {</p><p> "address": "DBCLUSTERNODEIP_3:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "DBCLUSTERNODEIP_3:3306"</p><p>}</p><p> MySQL DBCLUSTERNODEIP_3:3306 ssl JS ></p><p><br /></p><p><br /></p><p><br /></p><p>mysql> SELECT @@GLOBAL.GTID_EXECUTED \G</p><p>*************************** 1. row ***************************</p><p>@@GLOBAL.GTID_EXECUTED: 175f7950-4ac8-11ed-893f-00505684085f:1-2956230:3303697,</p><p>56be8ffc-c8b3-11ea-93d3-00505684f7cd:1-37847672,</p><p>d1552329-9fff-11e9-aa0b-00505694881c:1-77</p><p>1 row in set (0.00 sec)</p><p><br /></p><p><br /></p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS > var cluster=dba.getCluster()</p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "uatcluster",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "DBCLUSTERNODEIP_2:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "OK_NO_TOLERANCE",</p><p> "statusText": "Cluster is NOT tolerant to any failures. 1 member is not active",</p><p> "topology": {</p><p> "DBCLUSTERNODEIP_1:3306": {</p><p> "address": "DBCLUSTERNODEIP_1:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "DBCLUSTERNODEIP_2:3306": {</p><p> "address": "DBCLUSTERNODEIP_2:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "DBCLUSTERNODEIP_3:3306": {</p><p> "address": "DBCLUSTERNODEIP_3:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "role": "HA",</p><p> "status": "(MISSING)"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "DBCLUSTERNODEIP_2:3306"</p><p>}</p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS ></p><p>@nODE2 primary</p><p>mysql> SELECT @@GLOBAL.GTID_EXECUTED \G</p><p>ERROR 2006 (HY000): MySQL server has gone away</p><p>No connection. Trying to reconnect...</p><p>Connection id: 46843795</p><p>Current database: appdatabase</p><p><br /></p><p>*************************** 1. row ***************************</p><p>@@GLOBAL.GTID_EXECUTED: 175f7950-4ac8-11ed-893f-00505684085f:1-2956230:3303697-3340358,</p><p>56be8ffc-c8b3-11ea-93d3-00505684f7cd:1-37847672,</p><p>d1552329-9fff-11e9-aa0b-00505694881c:1-77</p><p>1 row in set (0.00 sec)</p><p><br /></p><p><br /></p><p>@node1:</p><p>mysql> select @@GLOBAL.GTID_EXECUTED\G;</p><p>ERROR 2006 (HY000): MySQL server has gone away</p><p>No connection. Trying to reconnect...</p><p>Connection id: 33090026</p><p>Current database: *** NONE ***</p><p><br /></p><p>*************************** 1. row ***************************</p><p>@@GLOBAL.GTID_EXECUTED: 175f7950-4ac8-11ed-893f-00505684085f:1-2956230:3303697-3340376,</p><p>56be8ffc-c8b3-11ea-93d3-00505684f7cd:1-37847672,</p><p>d1552329-9fff-11e9-aa0b-00505694881c:1-77</p><p>1 row in set (0.00 sec)</p><p><br /></p><p>ERROR:</p><p>No query specified</p><p><br /></p><p>@NODE2:</p><p>mysql> SELECT * FROM performance_schema.replication_group_members;</p><p>+---------------------------+--------------------------------------+--------------+-------------+--------------+-------------+----------------+</p><p>| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION |</p><p>+---------------------------+--------------------------------------+--------------+-------------+--------------+-------------+----------------+</p><p>| group_replication_applier | 503c2c17-c348-11ea-9ad7-00505684085f | DBCLUSTERNODEIP_2 | 3306 | ONLINE | PRIMARY | 8.0.20 |</p><p>| group_replication_applier | d1552329-9fff-11e9-aa0b-00505694881c | DBCLUSTERNODEIP_1 | 3306 | ONLINE | SECONDARY | 8.0.20 |</p><p>+---------------------------+--------------------------------------+--------------+-------------+--------------+-------------+----------------+</p><p>2 rows in set (0.00 sec)</p><p><br /></p><p>Error message at issue node 3:</p><p><br /></p><p>2023-03-07T00:00:05.382906-16:00 0 [Warning] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] local_server: error reading from the signalling connection?'</p><p>2023-03-07T00:00:05.400393-16:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Failure reading from fd=4160 n=18446744073709551615'</p><p>2023-03-07T00:00:05.435293-16:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Failure reading from fd=3768 n=18446744073709551615'</p><p>2023-03-07T00:00:05.503907-16:00 318334 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error pushing message into group communication engine.'</p><p>2023-03-07T00:00:05.504716-16:00 318334 [Note] [MY-011725] [Repl] Plugin group_replication reported: 'Error while sending stats message'</p><p>2023-03-07T00:00:06.504072-16:00 318334 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error pushing message into group communication engine.'</p><p>2023-03-07T00:00:06.506464-16:00 318334 [Note] [MY-011725] [Repl] Plugin group_replication reported: 'Error while sending stats message'</p><p><br /></p><p>Error at new primary node 2:</p><p><br /></p><p>2023-03-06T18:24:03.079983+08:00 31181620 [Warning] [MY-010956] [Server] Invalid replication timestamps: original commit timestamp is more recent than the immediate commit timestamp. This may be an issue if delayed replication is active. Make sure that servers have their clocks set to the correct time. No further message will be emitted until after timestamps become valid again.</p><p>2023-03-06T18:24:13.363163+08:00 31181620 [Warning] [MY-010957] [Server] The replication timestamps have returned to normal values.</p><p>2023-03-07T00:00:09.969558-16:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Re-using server node 0 host DBCLUSTERNODEIP_1'</p><p>2023-03-07T00:00:09.971275-16:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Re-using server node 1 host DBCLUSTERNODEIP_2'</p><p>2023-03-07T00:00:09.973312-16:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Installed site start={8506e6d0 7621487 0} boot_key={8506e6d0 7621476 1} event_horizon=10 node 1'</p><p>2023-03-07T00:00:11.631615-16:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Group is able to support up to communication protocol version 8.0.16'</p><p>2023-03-07T00:00:11.634347-16:00 0 [Warning] [MY-011499] [Repl] Plugin group_replication reported: 'Members removed from the group: DBCLUSTERNODEIP_3:3306'</p><p>2023-03-07T00:00:11.636807-16:00 0 [Note] [MY-011500] [Repl] Plugin group_replication reported: 'Primary server with address DBCLUSTERNODEIP_3:3306 left the group. Electing new Primary.'</p><p>2023-03-07T00:00:11.672475-16:00 0 [Note] [MY-013519] [Repl] Plugin group_replication reported: 'Elected primary member gtid_executed: 175f7950-4ac8-11ed-893f-00505684085f:1-2956230:3303697,</p><p>56be8ffc-c8b3-11ea-93d3-00505684f7cd:1-37847672,</p><p>d1552329-9fff-11e9-aa0b-00505694881c:1-77'</p><p>2023-03-07T00:00:11.676694-16:00 0 [Note] [MY-013519] [Repl] Plugin group_replication reported: 'Elected primary member applier channel received_transaction_set: 175f7950-4ac8-11ed-893f-00505684085f:1-2956230:3303697,</p><p>56be8ffc-c8b3-11ea-93d3-00505684f7cd:1-37847672,</p><p>d1552329-9fff-11e9-aa0b-00505694881c:1-77'</p><p>2023-03-07T00:00:12.674089-16:00 0 [Note] [MY-011507] [Repl] Plugin group_replication reported: 'A new primary with address DBCLUSTERNODEIP_2:3306 was elected. The new primary will execute all previous group transactions before allowing writes.'</p><p>2023-03-07T00:00:12.681058-16:00 0 [Note] [MY-011503] [Repl] Plugin group_replication reported: 'Group membership changed to DBCLUSTERNODEIP_2:3306, DBCLUSTERNODEIP_1:3306 on view 16735758337453400:8.'</p><p>2023-03-07T00:00:12.705600-16:00 46153146 [Note] [MY-011510] [Repl] Plugin group_replication reported: 'This server is working as primary member.'</p><p>2023-03-07T00:00:12.705616-16:00 31181617 [Note] [MY-011485] [Repl] Plugin group_replication reported: 'Primary had applied all relay logs, disabled conflict detection.'</p><p>2023-03-07T00:00:20.627864-16:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Failure reading from fd=-1 n=18446744073709551615'</p><p><br /></p><p>=======================================================</p><p><br /></p><p>Effort tried but no luck:</p><p>Cluster.removeInstance: MySQL server has gone away (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS > cluster.removeInstance("clusteradmin@DBCLUSTERNODEIP_3:3306");</p><p>Cluster.removeInstance: MySQL server has gone away (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS > dba.rebootClusterFromCompleteOutage();</p><p>Restoring the default cluster from complete outage...</p><p><br /></p><p>Dba.rebootClusterFromCompleteOutage: The MySQL instance 'DBCLUSTERNODEIP_2:3306' belongs to an InnoDB Cluster and is reachable. (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS > cluster.addInstance("DBCLUSTERNODEIP_3:3306");</p><p>Cluster.addInstance: MySQL server has gone away (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS > cluster.removeInstance("clusteradmin@DBCLUSTERNODEIP_3:3306", {force: true})</p><p>Cluster.removeInstance: MySQL server has gone away (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS > var cluster=dba.getCluster()</p><p>=================================================================</p><p>Once issue node 3 mysql service restarted. looks all working fine as like below.</p><p><br /></p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "uatcluster",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "DBCLUSTERNODEIP_2:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "OK",</p><p> "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",</p><p> "topology": {</p><p> "DBCLUSTERNODEIP_1:3306": {</p><p> "address": "DBCLUSTERNODEIP_1:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "DBCLUSTERNODEIP_2:3306": {</p><p> "address": "DBCLUSTERNODEIP_2:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "DBCLUSTERNODEIP_3:3306": {</p><p> "address": "DBCLUSTERNODEIP_3:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "DBCLUSTERNODEIP_2:3306"</p><p>}</p><div><br /></div>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-85714986675765111862023-02-13T18:00:00.003-08:002023-02-13T18:02:37.391-08:00AZURE MYSQL:::Amazon RDS::How do I kill a process in MySQL running within Azure MYSQL or Amazon RDS?<p>How do I kill a process in MySQL running within Azure MYSQL or Amazon RDS?</p><p>As root, I’m trying to kill a transaction that’s locking some tables. I run</p><p>KILL 1711;</p><p>/* SQL Error (1095): You are not owner of thread 1711 */</p><p>Received above error.</p><p><u>Solution:</u></p><p>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:</p><p>Connect to MySQL</p><p><u>List process:</u></p><p>SHOW FULL PROCESSLIST;</p><p>In my case, I want to kill the process of id 1711:</p><p>CALL mysql.rds_kill(1711);</p><p>or </p><p>CALL mysql.az_kill(1711);</p><p>Done</p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-75839272251575051832023-02-06T00:25:00.000-08:002023-02-06T00:25:42.452-08:00MYSQL:::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 <p>#MY-011505 Repl Plugin group_replication reported Member was expelled from the</p><p> group due to network failures changing member status to ERROR MY-011712 MY-011735 </p><p>--Verified MISSING node ERROR node resolution#</p><p><b>Solution:</b></p><p> cluster.rejoinInstance("loginadmin@DBCLUSTERNODEIP_1:3306")</p><p>rejoin the missing instance back to innodb cluster.</p><p>=========================================================================</p><p>MySQL Shell 8.0.20-commercial</p><p><br /></p><p>Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.</p><p>Oracle is a registered trademark of Oracle Corporation and/or its affiliates.</p><p>Other names may be trademarks of their respective owners.</p><p>Type '\help' or '\?' for help; '\quit' to exit.</p><p> MySQL JS > \c loginadmin@DBCLUSTERNODEIP_2:3306</p><p>Creating a session to 'loginadmin@DBCLUSTERNODEIP_2:3306'</p><p>Fetching schema names for autocompletion... Press ^C to stop.</p><p>Your MySQL connection id is 26666197</p><p>Server version: 8.0.20-commercial MySQL Enterprise Server - Commercial</p><p>No default schema selected; type \use <schema> to set one.</p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS > var cluster=dba.getCluster()</p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "uatcluster",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "DBCLUSTERNODEIP_2:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "OK_NO_TOLERANCE",</p><p> "statusText": "Cluster is NOT tolerant to any failures. 1 member is not active",</p><p> "topology": {</p><p> "DBCLUSTERNODEIP_1:3306": {</p><p> "address": "DBCLUSTERNODEIP_1:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "role": "HA",</p><p> "status": "(MISSING)"</p><p> },</p><p> "DBCLUSTERNODEIP_2:3306": {</p><p> "address": "DBCLUSTERNODEIP_2:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "DBCLUSTERNODEIP_3:3306": {</p><p> "address": "DBCLUSTERNODEIP_3:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "DBCLUSTERNODEIP_2:3306"</p><p>}</p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS > : cluster.rejoinInstance("loginadmin@DBCLUSTERNODEIP_1:3306")</p><p>SyntaxError: Unexpected token :</p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS > cluster.rejoinInstance("loginadmin@DBCLUSTERNODEIP_1:3306")</p><p>Rejoining the instance to the InnoDB cluster. Depending on the original</p><p>problem that made the instance unavailable, the rejoin operation might not be</p><p>successful and further manual steps will be needed to fix the underlying</p><p>problem.</p><p>Please monitor the output of the rejoin operation and take necessary action if</p><p>the instance cannot rejoin.</p><p>Rejoining instance to the cluster ...</p><p>The instance 'DBCLUSTERNODEIP_1:3306' was successfully rejoined on the cluster.</p><p> MySQL DBCLUSTERNODEIP_2:3306 ssl JS ></p><p>=========================================================================</p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-28395542532883618662023-02-06T00:10:00.001-08:002023-02-06T00:10:27.773-08:00 Oracle::TO shutdown fastly use alter system switch log file#Fast shutdown of Oracle Database<p> Oracle::TO shutdown in faster way use alter system switch log file:</p><p>SQL> alter system switch logfile;</p><p>System altered.</p><p>SQL> shutdown immediate;</p><p>Database closed.</p><p>Database dismounted.</p><p>ORACLE instance shut down.</p><p>SQL></p><p>Then release the server for any maintenance task.</p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-7272577147310107092023-02-06T00:06:00.001-08:002023-02-06T00:06:32.603-08:00 ORACLE::To Take RMAN Backups before oracle patch:Windows Server#check backup status<p><b> ORACLE::To Take RMAN Backups before oracle patch</b></p><p>C:\Users\cyberarkloginname>rman target sys/Password</p><p>Recovery Manager: Release 19.0.0.0.0 - Production on Sat Sep 3 10:01:37 2022</p><p>Version 19.3.0.0.0</p><p>Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.</p><p>connected to target database (not started)</p><p>=========================================================================</p><p>run {</p><p>allocate channel ch00 type disk;</p><p>allocate channel ch01 type disk;</p><p>allocate channel ch02 type disk;</p><p>backup format 'E:\DUMPS\ORACLEBACKUPS\full_db_%t_%sp%p' filesperset 10 database plus archivelog;</p><p>release channel ch00;</p><p>release channel ch01;</p><p>release channel ch02;</p><p>allocate channel ch00 type disk;</p><p>backup format 'E:\DUMPS\ORACLEBACKUPS\cntrl_%s_%p_%t' CURRENT CONTROLFILE;</p><p>backup format 'E:\DUMPS\ORACLEBACKUPS\spfile_%s_%p_%t' spfile;</p><p>release channel ch00;</p><p>}</p><p><b>--TO run below if any error during backups.</b></p><p>crosscheck archivelog all;</p><p>delete expired archivelog all;</p><p>---TO check the on backup duration of RMAN backup</p><p> SELECT sid, serial#, context, sofar, totalwork,</p><p> round(sofar/totalwork*100,2) "% Complete"</p><p> FROM v$session_longops</p><p> WHERE opname LIKE 'RMAN%'</p><p> AND opname NOT LIKE '%aggregate%'</p><p> AND totalwork != 0</p><p> AND sofar != totalwork; </p><p>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;</p><p> SID SERIAL# CONTEXT SOFAR TOTALWORK % Complete</p><p>---------- ---------- ---------- ---------- ---------- ----------</p><p> 503 43163 1 1192190 4532222 26.3</p><p><br /></p><p>SQL> /</p><p>=========================================================================</p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-81404058198498361212023-02-06T00:01:00.000-08:002023-02-06T00:01:05.561-08:00ORACLE::Steps to take care prior server startup or server shutdown or any maintenance in Oracle DATABASE SERVER<p> ORACLE::Steps to take care prior server startup or server shutdown or any maintenance in Oracle DATABASE SERVER</p><p>>>SQL> select * from v$backup;</p><p> FILE# STATUS CHANGE# TIME CON_ID</p><p>---------- ------------------ ---------- --------- ----------</p><p> 1 ACTIVE 392093972 30-JUN-22 1</p><p> 3 ACTIVE 392093980 30-JUN-22 1</p><p> 4 ACTIVE 392093988 30-JUN-22 1</p><p> 5 NOT ACTIVE 0 2</p><p> 6 NOT ACTIVE 0 2</p><p> 7 ACTIVE 392093996 30-JUN-22 1</p><p> 8 NOT ACTIVE 0 2</p><p> 9 NOT ACTIVE 0 3</p><p> 10 NOT ACTIVE 0 3</p><p> 11 NOT ACTIVE 0 3</p><p> 12 NOT ACTIVE 0 3</p><p><br /></p><p> FILE# STATUS CHANGE# TIME CON_ID</p><p>---------- ------------------ ---------- --------- ----------</p><p> 13 NOT ACTIVE 0 1</p><p> 14 NOT ACTIVE 0 1</p><p> 15 NOT ACTIVE 0 1</p><p> 16 NOT ACTIVE 0 1</p><p> 17 NOT ACTIVE 0 1</p><p> 18 NOT ACTIVE 0 1</p><p>17 rows selected.</p><p>>>If any active,then wait for it to complete.</p><p>>>Then shut immediate</p><p>SQL> alter system switch logfile;</p><p>System altered.</p><p>SQL> shutdown immediate;</p><p>Database closed.</p><p>Database dismounted.</p><p>ORACLE instance shut down.</p><p>SQL></p><p>>>Then handover server to windows team for patch or any maintenance to avoid unnecessary surprises.</p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-47760155932485969412023-02-05T23:37:00.003-08:002023-02-06T00:27:51.416-08:00MYSQL::SQL Error(3100): Error on observer while running replication hook 'before commit' in MYSQL innodb cluster group replication.#STOP GROUP REPLICATION<p> Error from application team end: SQL Error(3100): Error on observer while running replication hook 'before commit' in MYSQL innodb cluster group replication.</p><p>========================================================================</p><p>In this case, we just go to each node and run the following command to stop group replication:</p><p>Ideally, the step would be the following:</p><p>1. Execute the following command on all nodes to stop the group replication:</p><p>mysql> STOP GROUP_REPLICATION;</p><p>2. Run the following command on all nodes in the cluster:</p><p>mysql> SELECT @@GLOBAL.GTID_EXECUTED \G</p><p>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 )</p><p>3.. Once you find the node that contains highest GTID set, then you could connect it to the shell and run the following command:</p><p>MySQL JS> dba.rebootClusterFromCompleteOutage()</p><p>this should bring all nodes back online.</p><p>Then, you could restart the router to fetch the latest metadata.</p><p>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.</p><p>=================================================================</p><p>Commands executed:</p><p>mysql> STOP GROUP_REPLICATION;</p><p>Query OK, 0 rows affected (19.43 sec)</p><p>mysql> SELECT @@GLOBAL.GTID_EXECUTED \G</p><p>*************************** 1. row ***************************</p><p>@@GLOBAL.GTID_EXECUTED: 28179efb-72c5-11e4-b496-0050569242d9:1-13995703,</p><p>329fcb1a-c0dd-11eb-82b1-005056847352:1,</p><p>6a6ae23d-183f-11eb-ae83-005056846111:1-114606407:114931406-114935574,</p><p>ae4d4435-ecbc-11ea-a835-0050568415e0:1-348529,</p><p>d1f71bf8-c0dd-11eb-82b1-005056847352:1-253642653,</p><p>d9014b6b-1812-11eb-976b-005056846111:1-23</p><p>1 row in set (0.00 sec)</p><p>mysql></p><p>@MYSQL SHELL:</p><p>MySQL Shell 8.0.20-commercial</p><p>Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.</p><p>Oracle is a registered trademark of Oracle Corporation and/or its affiliates.</p><p>Other names may be trademarks of their respective owners.</p><p>Type '\help' or '\?' for help; '\quit' to exit.</p><p> MySQL JS > \c loginadmin@CLUSTERNODE3_IP:3306</p><p>Creating a session to 'loginadmin@CLUSTERNODE3_IP:3306'</p><p>Please provide the password for 'loginadmin@CLUSTERNODE3_IP:3306': **************</p><p>Save password for 'loginadmin@CLUSTERNODE3_IP:3306'? [Y]es/[N]o/Ne[v]er (default No):</p><p>Fetching schema names for autocompletion... Press ^C to stop.</p><p>Your MySQL connection id is 5215</p><p>Server version: 8.0.20-commercial MySQL Enterprise Server - Commercial</p><p>No default schema selected; type \use <schema> to set one.</p><p> MySQL CLUSTERNODE3_IP:3306 ssl JS > var cluster =dba.getCluster();</p><p>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)</p><p> MySQL CLUSTERNODE3_IP:3306 ssl JS > cluster.status();</p><p>TypeError: Cannot read property 'status' of undefined</p><p> MySQL CLUSTERNODE3_IP:3306 ssl JS > dba.rebootClusterFromCompleteOutage()</p><p>Restoring the default cluster from complete outage...</p><p><br /></p><p>The instance 'CLUSTERNODE2_IP:3306' was part of the cluster configuration.</p><p>Would you like to rejoin it to the cluster? [y/N]: y</p><p><br /></p><p>The instance 'CLUSTERNODE1_IP:3306' was part of the cluster configuration.</p><p>Would you like to rejoin it to the cluster? [y/N]: y</p><p><br /></p><p>Disabling super_read_only mode on instance 'CLUSTERNODE3_IP:3306'.</p><p>WARNING: The member will only proceed according to its exitStateAction if auto-rejoin fails (i.e. all retry attempts are exhausted).</p><p><br /></p><p>CLUSTERNODE3_IP:3306 was restored.</p><p>Rejoining 'CLUSTERNODE2_IP:3306' to the cluster.</p><p>Rejoining 'CLUSTERNODE1_IP:3306' to the cluster.</p><p>The cluster was successfully rebooted.</p><p><br /></p><p><Cluster:prodcluster></p><p> MySQL CLUSTERNODE3_IP:3306 ssl JS > cluster.status();</p><p>TypeError: Cannot read property 'status' of undefined</p><p> MySQL CLUSTERNODE3_IP:3306 ssl JS > var cluster =dba.getCluster();</p><p> MySQL CLUSTERNODE3_IP:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "prodcluster",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "CLUSTERNODE3_IP:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "OK",</p><p> "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",</p><p> "topology": {</p><p> "CLUSTERNODE1_IP:3306": {</p><p> "address": "CLUSTERNODE1_IP:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "CLUSTERNODE2_IP:3306": {</p><p> "address": "CLUSTERNODE2_IP:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "CLUSTERNODE3_IP:3306": {</p><p> "address": "CLUSTERNODE3_IP:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "CLUSTERNODE3_IP:3306"</p><p>}</p><p> MySQL CLUSTERNODE3_IP:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "prodcluster",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "CLUSTERNODE3_IP:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "OK",</p><p> "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",</p><p> "topology": {</p><p> "CLUSTERNODE1_IP:3306": {</p><p> "address": "CLUSTERNODE1_IP:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "CLUSTERNODE2_IP:3306": {</p><p> "address": "CLUSTERNODE2_IP:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "CLUSTERNODE3_IP:3306": {</p><p> "address": "CLUSTERNODE3_IP:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "CLUSTERNODE3_IP:3306"</p><p>}</p><p> MySQL CLUSTERNODE3_IP:3306 ssl JS ></p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-24079370756078343952023-02-05T23:20:00.002-08:002023-02-06T00:28:07.917-08:00MYSQL::TO read binary logs content by mysqlbinlog to text file#to see what query executed for auditing or issue finding by mysqlbinlog reading<p><b> TO read binary logs content by mysqlbinlog to text file:</b></p><p><b>Working steps: @mysql 8.0.20</b></p><p>**Copy binary log file to some other server and then generate scripts.</p><p>--Place above binary log file to Path:C:\Program Files\MySQL\MySQL Server 8.0\bin> and try below </p><p> C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME-bin.007127 --base64-output=DECODE-ROWS --verbose > C:\Temp\statements_latestone.sql</p><p>C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000056 > C:\Temp\statements.sql</p><p>DBSERVERNAME-bin.007127</p><p>C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME-bin.007127 --base64-output=DECODE-ROWS --verbose > C:\Temp\statements_latestone.sql</p><p>--base64-output=DECODE-ROWS --verbose</p><p>C:\Program Files\MySQL\MySQL Server 8.0\bin></p><p>##########################################################################</p><p>--<b>Place above binary log file to Path:</b></p><p>C:\Program Files\MySQL\MySQL Server 8.0\bin> and try below </p><p>C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --base64-output=DECODE-ROWS --verbose > C:\Temp\statements_latest11.sql</p><p>--To filter binary logs based on issue start time and stop time.</p><p>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</p><p><br /></p><p>C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --base64-output=DECODE-ROWS -vv > C:\Temp\statements_latest13.sql</p><p><br /></p><p>C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --base64-output=DECODE-ROWS -vv > C:\Temp\statements_latest13.sql</p><p><br /></p><p>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</p><p><br /></p><p>C:\Program Files\MySQL\MySQL Server 8.0\bin></p><p>########################################################################</p><p><br /></p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-52561942041195664382023-02-05T23:06:00.001-08:002023-02-06T00:28:20.598-08:00MYSQL::MEB Database backup restore Error #The innodb_log_file_size value 4294967296 is invalid. The backup has been taken with 1073741824.<p>MEB Database backup restore Error: </p><p>ERROR: The innodb_log_file_size value 4294967296 is invalid. The backup has been taken with 1073741824.</p><p>=========================================================================</p><p>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</p><p>MySQL Enterprise Backup Ver 8.0.20-commercial for Win64 on x86_64 (MySQL Enterprise - Commercial)</p><p>Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.</p><p><br /></p><p>Oracle is a registered trademark of Oracle Corporation and/or its</p><p>affiliates. Other names may be trademarks of their respective</p><p>owners.</p><p><br /></p><p>Starting with following command line ...</p><p> mysqlbackup.exe --defaults-file=E:\workspace\data\my.ini</p><p> --backup-image=E:\dumps\BACKUP\FULL_20211009_123244.img</p><p> --backup-dir=C:\Temp\TMPDUMP --encrypt-password=xxxxxxxxxxxxxxxxx</p><p> copy-back-and-apply-log</p><p><br /></p><p>IMPORTANT: Please check that mysqlbackup run completes successfully.</p><p> At the end of a successful 'copy-back-and-apply-log' run mysqlbackup</p><p> prints "mysqlbackup completed OK!".</p><p><br /></p><p>210914 14:43:14 MAIN INFO: Starting to log actions.</p><p>210914 14:43:14 MAIN INFO: Backup directory exists: 'C:\Temp\TMPDUMP'</p><p>210914 14:43:14 MAIN INFO: Backup Image MEB version string: 8.0.20 [2020-03-31 10:47:11]</p><p>210914 14:43:14 MAIN INFO: MySQL server version is '8.0.20'</p><p>210914 14:43:14 MAIN ERROR: The innodb_log_file_size value 4294967296 is invalid. The backup has been taken with 1073741824.</p><p>210914 14:43:14 MAIN ERROR: Server repository configuration problem found.</p><p>mysqlbackup exit code: 7, Invalid Argument</p><p>mysqlbackup failed with errors!</p><p>=========================================================================</p><p><b>Solution: </b></p><p>modify the innodb_log_file_size parameter value from my.ini configuration file to 4294967296. Thats it.</p><p>Then try to run the MEB database restore script,it will get success.</p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-83278513685815746412023-02-05T22:54:00.002-08:002023-02-06T00:28:31.999-08:00MYSQL::Steps to perform mysql enterprise database backup restore #Backup restore #MEB restore<p>Steps to perform mysql enterprise database backup restore:mysql 8.0.20</p><p>Commands used:</p><p>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</p><p><br /></p><p>Note: Mention the encrypt password which referenced from the production server backup.</p><p>======================================================================</p><p>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</p><p>MySQL Enterprise Backup Ver 8.0.20-commercial for Win64 on x86_64 (MySQL Enterprise - Commercial)</p><p>Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.</p><p><br /></p><p>Oracle is a registered trademark of Oracle Corporation and/or its</p><p>affiliates. Other names may be trademarks of their respective</p><p>owners.</p><p><br /></p><p>Starting with following command line ...</p><p> mysqlbackup.exe --defaults-file=E:\workspace\data\my.ini</p><p> --backup-image=E:\dumps\BACKUP\FULL_20211009_123244.img</p><p> --backup-dir=C:\Temp\TMPDUMP --encrypt-password=xxxxxxxxxxxxxxxxx</p><p> copy-back-and-apply-log</p><p><br /></p><p>IMPORTANT: Please check that mysqlbackup run completes successfully.</p><p> At the end of a successful 'copy-back-and-apply-log' run mysqlbackup</p><p> prints "mysqlbackup completed OK!".</p><p><br /></p><p>210914 14:48:25 MAIN INFO: Starting to log actions.</p><p>210914 14:48:25 MAIN INFO: Backup directory exists: 'C:\Temp\TMPDUMP'</p><p>210914 14:48:25 MAIN INFO: Backup Image MEB version string: 8.0.20 [2020-03-31 10:47:11]</p><p>210914 14:48:26 MAIN INFO: MySQL server version is '8.0.20'</p><p>210914 14:48:26 MAIN INFO: Server is not a community server.</p><p>210914 14:48:26 MAIN INFO: KEF source path:'C:/Temp/TMPDUMP/meta/keyring_kef'</p><p>210914 14:48:26 MAIN INFO: KEF target path:'E:/workspace/data/Data/keyring_kef'</p><p>210914 14:48:26 MAIN INFO: TDE Keyring service initialized.</p><p>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</p><p><br /></p><p>--------------------------------------------------------------------</p><p> Server Repository Options:</p><p>--------------------------------------------------------------------</p><p> datadir = E:\workspace\data\Data</p><p> innodb_data_home_dir = E:\workspace\data\Data</p><p> innodb_data_file_path = ibdata1:12M:autoextend</p><p> innodb_log_group_home_dir = E:\workspace\data\Data</p><p> innodb_log_files_in_group = 2</p><p> innodb_log_file_size = 1073741824</p><p> innodb_undo_directory = E:\workspace\data\Data</p><p> innodb_undo_tablespaces = 2</p><p> innodb_buffer_pool_filename = ib_buffer_pool</p><p> innodb_page_size = Null</p><p> innodb_checksum_algorithm = crc32</p><p><br /></p><p>--------------------------------------------------------------------</p><p> Backup Config Options:</p><p>--------------------------------------------------------------------</p><p> datadir = C:\Temp\TMPDUMP\datadir</p><p> innodb_data_home_dir = C:\Temp\TMPDUMP\datadir</p><p> innodb_data_file_path = ibdata1:12M:autoextend</p><p> innodb_log_group_home_dir = C:\Temp\TMPDUMP\datadir</p><p> innodb_log_files_in_group = 2</p><p> innodb_log_file_size = 1073741824</p><p> innodb_undo_directory = C:\Temp\TMPDUMP\datadir</p><p> innodb_undo_tablespaces = 2</p><p> innodb_buffer_pool_filename = ib_buffer_pool</p><p> innodb_page_size = 16384</p><p> innodb_checksum_algorithm = crc32</p><p><br /></p><p>210914 14:48:26 MAIN INFO: Creating 14 buffers each of size 16777216.</p><p>210914 14:48:26 MAIN INFO: Copy-back-and-apply-log operation starts with following threads</p><p> 1 read-threads 6 process-threads 1 write-threads</p><p>210914 14:48:26 PCR1 INFO: Copying database directory: meta</p><p>210914 14:48:26 RDR1 INFO: Copying ibdata1.</p><p>210914 14:48:27 RDR1 Progress in MB: 200 400 600 800 1000</p><p>210914 14:48:29 RDR1 INFO: Copying undo_002.</p><p>210914 14:48:29 RDR1 INFO: Copying undo_001.</p><p>210914 14:48:30 RDR1 INFO: Copying sys/sys_config.ibd.</p><p><br /></p><p>210914 14:50:54 RDR1 INFO: Copying mysql.ibd.</p><p>210914 14:50:54 RDR1 INFO: Copying DATABASENAMEDBUAT3-bin.000070.</p><p>210914 14:50:54 RDR1 Progress in MB: 39800 40000 40200 40400 40600</p><p>210914 14:50:57 RDR1 INFO: Copying DATABASENAMEDBUAT3-bin.000071.</p><p>210914 14:50:57 RDR1 Progress in MB: 40800 41000 41200 41400 41600 41800</p><p>210914 14:51:00 PCR5 INFO: Copying database directory: #clone</p><p>210914 14:51:00 PCR3 INFO: Copying database directory: DATABASENAME</p><p>210914 14:51:00 PCR4 INFO: Copying database directory: mysql</p><p>210914 14:51:00 PCR6 INFO: Copying database directory: mysql_innodb_cluster_metadata</p><p>210914 14:51:00 RDR1 INFO: Binlog Log Index: 'E:/workspace/data/Data/DATABASENAMEDBUAT3-bin.index'</p><p>210914 14:51:00 PCR2 INFO: Copying database directory: performance_schema</p><p>210914 14:51:00 RDR1 INFO: Copying DATABASENAMEDBUAT3-bin.000072.</p><p>210914 14:51:00 PCR2 INFO: Copying database directory: sys</p><p>210914 14:51:01 RDR1 Progress in MB: 42000 42200 42400</p><p>210914 14:51:03 MAIN INFO: MySQL server version is '8.0.20-commercial'</p><p>210914 14:51:03 MAIN INFO: Restoring ...8.0.20-commercial version</p><p>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.</p><p>210914 14:51:03 MAIN INFO: Copy-back operation completed successfully.</p><p>210914 14:51:03 MAIN INFO: Source Image Path = E:\dumps\BACKUP\FULL_20211009_123244.img</p><p>.</p><p>.</p><p>.</p><p>210914 14:51:03 MAIN INFO: MySQL server version is '8.0.20-commercial'</p><p>210914 14:51:03 MAIN INFO: Restoring ...8.0.20-commercial version</p><p>210914 14:51:03 MAIN INFO: Creating 14 buffers each of size 65536.</p><p>210914 14:51:03 MAIN INFO: Apply-log operation starts with following threads</p><p> 1 read-threads 1 process-threads 6 apply-threads</p><p>210914 14:51:03 MAIN INFO: Using up to 100 MB of memory.</p><p>210914 14:51:03 MAIN INFO: Loading keys from 'C:/Temp/TMPDUMP/meta/keyring_kef'.</p><p>210914 14:51:03 MAIN INFO: Initialized keyring(1 keys) for apply-log.</p><p>210914 14:51:03 MAIN INFO: ibbackup_logfile's creation parameters:</p><p> start lsn 402744199680, end lsn 402744486896,</p><p> start checkpoint 402744200010.</p><p><br /></p><p>210914 14:51:12 MAIN INFO: Loading the space id : 3391, space name : E:/workspace/data/Data/mysql/backup_progress.ibd.</p><p>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.</p><p>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.</p><p>210914 14:51:12 MAIN INFO: Loading the space id : 3377, space name : E:/workspace/data/Data/mysql_innodb_cluster_metadata/clusters.ibd.</p><p>210914 14:51:12 MAIN INFO: Loading the space id : 3378, space name : E:/workspace/data/Data/mysql_innodb_cluster_metadata/instances.ibd.</p><p>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.</p><p>210914 14:51:12 MAIN INFO: Loading the space id : 3381, space name : E:/workspace/data/Data/mysql_innodb_cluster_metadata/routers.ibd.</p><p>210914 14:51:12 MAIN INFO: Loading the space id : 1121, space name : E:/workspace/data/Data/sys/sys_config.ibd.</p><p>210914 14:51:12 MAIN INFO: Loading the space id : 4294967294, space name : E:/workspace/data/Data/mysql.ibd.</p><p>210914 14:51:12 MAIN INFO: Loading the space id : 4294967279, space name : E:/workspace/data/Data/undo_001.</p><p>210914 14:51:12 MAIN INFO: Loading the space id : 4294967278, space name : E:/workspace/data/Data/undo_002.</p><p>210914 14:51:12 PCR1 INFO: Starting to parse redo log at lsn = 402744199843, whereas checkpoint_lsn = 402744200010.</p><p>210914 14:51:12 PCR1 INFO: Doing recovery: scanned up to log sequence number 402744486896.</p><p>210914 14:51:12 PCR1 INFO: Starting to apply a batch of log records to the database....</p><p>InnoDB: Progress in percent: 0</p><p>210914 14:51:14 PCR1 INFO: Updating last checkpoint to 402744486194 in redo log/</p><p>210914 14:51:14 PCR1 INFO: Setting 'ib_logfile0' file size to 1073741824</p><p>210914 14:51:14 PCR1 INFO: Setting log file size to 1024 MB. Progress : 10%.</p><p>210914 14:51:15 PCR1 INFO: Setting log file size to 1024 MB. Progress : 20%.</p><p>210914 14:51:15 PCR1 INFO: Setting log file size to 1024 MB. Progress : 30%.</p><p>210914 14:51:15 PCR1 INFO: Setting log file size to 1024 MB. Progress : 40%.</p><p>210914 14:51:15 PCR1 INFO: Setting log file size to 1024 MB. Progress : 50%.</p><p>210914 14:51:15 PCR1 INFO: Setting log file size to 1024 MB. Progress : 60%.</p><p>210914 14:51:15 PCR1 INFO: Setting log file size to 1024 MB. Progress : 70%.</p><p>210914 14:51:15 PCR1 INFO: Setting log file size to 1024 MB. Progress : 80%.</p><p>210914 14:51:15 PCR1 INFO: Setting log file size to 1024 MB. Progress : 90%.</p><p>210914 14:51:15 PCR1 INFO: Setting log file size to 1024 MB. Progress : 100%.</p><p>210914 14:51:19 PCR1 INFO: Setting 'ib_logfile1' file size to 1073741824</p><p>210914 14:51:19 PCR1 INFO: Setting log file size to 1024 MB. Progress : 10%.</p><p>210914 14:51:19 PCR1 INFO: Setting log file size to 1024 MB. Progress : 20%.</p><p>210914 14:51:19 PCR1 INFO: Setting log file size to 1024 MB. Progress : 30%.</p><p>210914 14:51:19 PCR1 INFO: Setting log file size to 1024 MB. Progress : 40%.</p><p>210914 14:51:19 PCR1 INFO: Setting log file size to 1024 MB. Progress : 50%.</p><p>210914 14:51:19 PCR1 INFO: Setting log file size to 1024 MB. Progress : 60%.</p><p>210914 14:51:20 PCR1 INFO: Setting log file size to 1024 MB. Progress : 70%.</p><p>210914 14:51:20 PCR1 INFO: Setting log file size to 1024 MB. Progress : 80%.</p><p>210914 14:51:20 PCR1 INFO: Setting log file size to 1024 MB. Progress : 90%.</p><p>210914 14:51:20 PCR1 INFO: Setting log file size to 1024 MB. Progress : 100%.</p><p>210914 14:51:23 PCR1 INFO: Log file header:</p><p> format = 4</p><p> pad1 = 0</p><p> start lsn = 402744485888</p><p> checkpoint lsn = 402744486194</p><p> checksum = 482103000</p><p> creator = MEB 8.0.20</p><p>210914 14:51:23 PCR1 INFO: We were able to parse ibbackup_logfile up to</p><p> lsn 402744486896.</p><p>210914 14:51:23 PCR1 INFO: Last MySQL binlog file position 0 -1, file name DATABASENAMEDBUAT3-bin.000072</p><p>210914 14:51:23 PCR1 INFO: The first data file is 'E:/workspace/data/Data/ibdata1'</p><p> and the new created log files are at 'E:\workspace\data\Data'</p><p>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'.</p><p>210914 14:51:23 MAIN INFO: Apply-log operation completed successfully.</p><p>210914 14:51:23 MAIN INFO: Full Backup has been restored successfully.</p><p>mysqlbackup completed OK! with 1 warnings</p><p>C:\Program Files\MySQL\mysql-backup-8.0.20\bin></p><p>======================================================================</p><p>Note: Mysql database backup restore got success if we see mysqlbackup completed OK! in the end of the restore log.</p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-13948606662890337172023-02-05T22:37:00.002-08:002023-02-06T00:28:43.225-08:00 MYSQL::Steps to take Mysql Enterprise backup #Backup #MEB #<p> Steps to take Mysql Enterprise backup:</p><p>================================================</p><p>Commands used:</p><p>mysqlbackup --user=mysqlbackup -pxxxxxxxxxxx --port=3306 --protocol=tcp</p><p> --with-timestamp --backup-dir=D:\backuplogs --read-threads=6</p><p> --process-threads=12 --write-threads=6 --limit-memory=9999</p><p> --number-of-buffers=2000MB --no-locking --skip-relaylog --skip-binlog</p><p> --encrypt-password=xxxxxxxxxxxxxxxxx</p><p> --backup-image=D:\backuplogs\FULL_20211009_123244.img</p><p> --messages-logdir=D:\backuplogs backup-to-image</p><p>===============================================</p><p><br /></p><p>Microsoft Windows [Version 10.0.17763.1999]</p><p>(c) 2018 Microsoft Corporation. All rights reserved.</p><p><br /></p><p>C:\Users\kumar.velayutham>cd C:\Program Files\MySQL\mysql-backup-8.0.20\bin</p><p><br /></p><p>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</p><p>MySQL Enterprise Backup Ver 8.0.20-commercial for Win64 on x86_64 (MySQL Enterprise - Commercial)</p><p>Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.</p><p><br /></p><p>Oracle is a registered trademark of Oracle Corporation and/or its</p><p>affiliates. Other names may be trademarks of their respective</p><p>owners.</p><p><br /></p><p>Starting with following command line ...</p><p> mysqlbackup --user=mysqlbackup -pxxxxxxxxxxx --port=3306 --protocol=tcp</p><p> --with-timestamp --backup-dir=D:\backuplogs --read-threads=6</p><p> --process-threads=12 --write-threads=6 --limit-memory=9999</p><p> --number-of-buffers=2000MB --no-locking --skip-relaylog</p><p> --encrypt-password=xxxxxxxxxxxxxxxxx</p><p> --backup-image=D:\backuplogs\FULL_20211009_123244.img</p><p> --messages-logdir=D:\backuplogs backup-to-image</p><p><br /></p><p>IMPORTANT: Please check that mysqlbackup run completes successfully.</p><p> At the end of a successful 'backup-to-image' run mysqlbackup</p><p> prints "mysqlbackup completed OK!".</p><p><br /></p><p>210910 12:32:45 MAIN INFO: Starting to log actions.</p><p>210910 12:32:45 MAIN INFO: MEB logfile created at D:\backuplogs\MEB_2021-09-10.12-32-45_image_backup.log</p><p><br /></p><p>210910 12:32:45 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:45 MAIN INFO: MySQL server version is '8.0.20-commercial'</p><p>210910 12:32:45 MAIN INFO: MySQL server compile os version is 'Win64'</p><p>210910 12:32:45 MAIN INFO: SSL/TLS version used for connection is TLSv1.3</p><p>210910 12:32:45 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:45 MAIN INFO: Got some server configuration information from running server.</p><p><br /></p><p>210910 12:32:45 MAIN INFO: Establishing connection to server for locking.</p><p>210910 12:32:45 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:45 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:45 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:45 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:45 MAIN INFO: Backup directory created: 'D:/backuplogs/2021-09-10_12-32-45'</p><p>210910 12:32:45 MAIN INFO: MySQL server version_comment is 'MySQL Enterprise Server - Commercial'</p><p>210910 12:32:45 MAIN INFO: Mysqlbackup component not installed.</p><p>210910 12:32:45 MAIN INFO: Server is not a community server.</p><p>210910 12:32:45 MAIN INFO: Current active keyring 'keyring_encrypted_file'</p><p>210910 12:32:45 MAIN INFO: KEF source path:'D:/workspace/keyring/keyring'</p><p>210910 12:32:45 MAIN INFO: KEF target path:'D:/backuplogs/2021-09-10_12-32-45/meta/keyring_kef'</p><p>210910 12:32:45 MAIN INFO: TDE Keyring service initialized.</p><p>--------------------------------------------------------------------</p><p> Server Repository Options:</p><p>--------------------------------------------------------------------</p><p> datadir = D:\workspace\data\</p><p> innodb_data_home_dir =</p><p> innodb_data_file_path = ibdata1:12M:autoextend</p><p> innodb_log_group_home_dir = D:\workspace\data\</p><p> innodb_log_files_in_group = 2</p><p> innodb_log_file_size = 1073741824</p><p> innodb_undo_directory = D:\workspace\data\</p><p> innodb_undo_tablespaces = 2</p><p> innodb_buffer_pool_filename = ib_buffer_pool</p><p> innodb_page_size = 16384</p><p> innodb_checksum_algorithm = crc32</p><p><br /></p><p>--------------------------------------------------------------------</p><p> Backup Config Options:</p><p>--------------------------------------------------------------------</p><p> datadir = D:\backuplogs\2021-09-10_12-32-45\datadir</p><p> innodb_data_home_dir = D:\backuplogs\2021-09-10_12-32-45\datadir</p><p> innodb_data_file_path = ibdata1:12M:autoextend</p><p> innodb_log_group_home_dir = D:\backuplogs\2021-09-10_12-32-45\datadir</p><p> innodb_log_files_in_group = 2</p><p> innodb_log_file_size = 1073741824</p><p> innodb_undo_directory = D:\backuplogs\2021-09-10_12-32-45\datadir</p><p> innodb_undo_tablespaces = 2</p><p> innodb_buffer_pool_filename = ib_buffer_pool</p><p> innodb_page_size = 16384</p><p> innodb_checksum_algorithm = crc32</p><p><br /></p><p>Backup Image Path = D:\backuplogs\FULL_20211009_123244.img</p><p>210910 12:32:45 MAIN INFO: Unique generated backup id for this is 16312483653165319</p><p><br /></p><p>210910 12:32:45 MAIN INFO: Copying the server config file 'D:/workspace/data/auto.cnf'</p><p>210910 12:32:45 MAIN INFO: Copying the server config file 'D:/workspace/data/mysqld-auto.cnf'</p><p>210910 12:32:45 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:45 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:45 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:46 MAIN INFO: Creating 112 buffers each of size 16777216.</p><p>210910 12:32:46 MAIN INFO: Failed to start redo log archiving...</p><p>210910 12:32:46 MAIN INFO: Found checkpoint at lsn 402744200010.</p><p>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.</p><p>210910 12:32:46 MAIN INFO: This backup has encrypted tables or encrypted binary log files, encrypt password is set.</p><p>210910 12:32:46 MAIN INFO: Full Image Backup operation starts with following threads</p><p> 6 read-threads 12 process-threads 6 write-threads</p><p>210910 12:32:46 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:46 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:46 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:46 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:46 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:46 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:32:46 RDR2 INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/backup-my.cnf.</p><p>210910 12:32:46 RDR1 INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/meta/backup_create.xml.</p><p>210910 12:32:46 RDR4 INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/datadir/backup-auto.cnf.</p><p>210910 12:32:46 RLP1 INFO: Starting to parse redo log at lsn = 402744199843, whereas checkpoint_lsn = 402744200010.</p><p>210910 12:32:46 RDR5 INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/datadir/backup-mysqld-auto.cnf.</p><p>210910 12:32:46 RDR3 INFO: Starting to copy all innodb files...</p><p>210910 12:32:46 RDR3 INFO: Copying D:/workspace/data/ibdata1.</p><p>210910 12:32:46 RDR6 Progress in MB: 200 400 600 800 1000</p><p>210910 12:32:48 RDR4 INFO: Starting to copy all undo files...</p><p>210910 12:32:48 RDR4 INFO: Copying D:/workspace/data/undo_002.</p><p>210910 12:32:48 RDR5 INFO: Copying D:/workspace/data/undo_001.</p><p>210910 12:33:02 RDR4 INFO: Copying D:/workspace/data/sys/sys_config.ibd.</p><p>:</p><p>:</p><p>:</p><p>210910 12:40:16 RDR5 INFO: Copying D:/workspace/data/mysql.ibd.</p><p>210910 12:40:16 RDR3 INFO: Completing the copy of innodb files.</p><p>210910 12:40:16 RDR3 INFO: Requesting a dump of the InnoDB buffer pool</p><p>210910 12:40:16 RDR3 INFO: Waiting for the dump of the InnoDB buffer pool to complete</p><p>210910 12:40:17 RDR3 INFO: The dump of the InnoDB buffer pool completed</p><p>210910 12:40:17 RDR6 INFO: Binary Log Index: 'D:/workspace/data/DATABASENAMEDBUAT3-bin.index'</p><p>210910 12:40:17 RDR6 INFO: Starting to copy Binlog files.</p><p>210910 12:40:17 RDR6 INFO: Copying D:/workspace/data/DATABASENAMEDBUAT3-bin.000070.</p><p>210910 12:40:18 RDR5 Progress in MB: 39800 40000 40200 40400 40600</p><p>210910 12:40:25 RDR6 INFO: Copying D:/workspace/data/DATABASENAMEDBUAT3-bin.000071.</p><p>210910 12:40:26 RDR2 Progress in MB: 40800 41000 41200 41400 41600 41800</p><p>210910 12:40:33 RDR6 INFO: Starting to lock instance for backup...</p><p>210910 12:40:33 RDR6 INFO: The server instance is locked for backup.</p><p>210910 12:40:33 RDR6 INFO: Requesting flush of redo log reading after LSN 402744479001.</p><p>210910 12:40:33 RDR6 INFO: Requesting flush of redo log processing after LSN 402744479001.</p><p>210910 12:40:33 RDR6 INFO: Completed flush of redo log reading after LSN 402744479001.</p><p>210910 12:40:33 RDR6 INFO: Completed flush of redo log processing after LSN 402744479001.</p><p>210910 12:40:37 RDR6 INFO: Opening backup source directory 'D:/workspace/data'</p><p>210910 12:40:37 RDR6 INFO: Starting to copy non-innodb files in subdirs of 'D:/workspace/data'</p><p>210910 12:40:37 RDR6 INFO: Completing the copy of all non-innodb files.</p><p>210910 12:40:45 WTR2 INFO: Adding database directory: datadir/#clone</p><p>210910 12:40:45 WTR2 INFO: Adding database directory: datadir/DATABASENAME</p><p>210910 12:40:45 WTR6 INFO: Adding database directory: datadir/mysql</p><p>210910 12:40:45 WTR6 INFO: Adding database directory: datadir/mysql_innodb_cluster_metadata</p><p>210910 12:40:45 WTR2 INFO: Adding database directory: datadir/performance_schema</p><p>210910 12:40:45 WTR2 INFO: Adding database directory: datadir/sys</p><p>210910 12:40:46 RDR6 INFO: Requesting consistency information...</p><p>210910 12:40:46 RDR6 INFO: Locked the consistency point for 1094 microseconds.</p><p>210910 12:40:46 RDR6 INFO: Consistency point server_uuid '4249a073-c8c1-11ea-92ab-005056843959'.</p><p>210910 12:40:46 RDR6 INFO: Consistency point gtid_executed '56be8ffc-c8b3-11ea-93d3-00505684f7cd:1-17752057:18362763,</p><p>d1552329-9fff-11e9-aa0b-00505694881c:1-77'.</p><p>210910 12:40:46 RDR6 INFO: Consistency point binary_log_file 'DATABASENAMEDBUAT3-bin.000072'.</p><p>210910 12:40:46 RDR6 INFO: Consistency point binary_log_position 692934398.</p><p>210910 12:40:46 RDR6 INFO: Consistency point replication channel 'group_replication_applier':</p><p>210910 12:40:46 RDR6 INFO: Consistency point relay_log_file 'DATABASENAMEDBUAT3-relay-log-bin-group_replication_applier.000020':</p><p>210910 12:40:46 RDR6 INFO: Consistency point relay_log_position 353.</p><p>210910 12:40:46 RDR6 INFO: Consistency point replication channel 'group_replication_recovery':</p><p>210910 12:40:46 RDR6 INFO: Consistency point relay_log_file 'DATABASENAMEDBUAT3-relay-log-bin-group_replication_recovery.000002':</p><p>210910 12:40:46 RDR6 INFO: Consistency point relay_log_position 152.</p><p>210910 12:40:46 RDR6 INFO: Consistency point InnoDB lsn 402744486896.</p><p>210910 12:40:46 RDR6 INFO: Consistency point InnoDB lsn_checkpoint 402744486194.</p><p>210910 12:40:46 RDR6 INFO: Requesting completion of redo log copy after LSN 402744486896.</p><p>210910 12:40:46 RLR1 INFO: Redo log reader waited 30145 times for a total of 150725.00 ms for logs to generate.</p><p>210910 12:40:46 RLW1 INFO: A copied database page was modified at 402744450628. (This is the highest lsn found on a page)</p><p>210910 12:40:46 RLW1 INFO: Scanned log up to lsn 402744486896.</p><p>210910 12:40:46 RLW1 INFO: Was able to parse the log up to lsn 402744486896.</p><p>210910 12:40:46 RDR1 INFO: Copying D:/workspace/data/DATABASENAMEDBUAT3-bin.000072.</p><p>210910 12:40:47 RDR6 Progress in MB: 42000 42200 42400</p><p>210910 12:40:50 RDR6 INFO: Completed the copy of binlog files...</p><p>210910 12:40:50 RDR6 INFO: The server instance is unlocked after 16.738 seconds.</p><p>210910 12:40:50 RDR6 INFO: Found encrypted tablespaces or encrypted binary logs, migrating the keys.</p><p>210910 12:40:50 RDR6 INFO: Active keyring "keyring_encrypted_file" detected.</p><p>210910 12:40:50 RDR6 INFO: KEF Keyring generated at 'D:/backuplogs/2021-09-10_12-32-45/meta/keyring_kef'.</p><p>210910 12:40:50 RDR6 INFO: Reading all global variables from the server.</p><p>210910 12:40:50 RDR6 INFO: Completed reading of all 625 global variables from the server.</p><p>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'.</p><p>210910 12:40:53 RDR6 INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/meta/backup_variables.txt.</p><p>210910 12:40:53 RDR2 INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/datadir/ibbackup_logfile.</p><p>210910 12:40:53 RDR4 INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/server-all.cnf.</p><p>210910 12:40:53 RDR3 INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/server-my.cnf.</p><p>210910 12:40:53 RDR5 INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/meta/backup_gtid_executed.sql.</p><p>210910 12:40:53 RDR1 INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/meta/keyring_kef.</p><p>210910 12:40:53 RDR6 INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/meta/backup_content.xml.</p><p>210910 12:40:53 RDR4 INFO: Copying meta file D:/backuplogs/2021-09-10_12-32-45/meta/image_files.xml.</p><p>210910 12:40:54 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:40:54 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:40:54 MAIN INFO: SSL: attempting to use an SSL connection.</p><p>210910 12:40:54 MAIN INFO: Group replication setup detected.</p><p>210910 12:40:54 MAIN INFO: Current node is a primary node</p><p>210910 12:40:55 MAIN INFO: Full Image Backup operation completed successfully.</p><p>210910 12:40:55 MAIN INFO: Backup image created successfully.</p><p>210910 12:40:55 MAIN INFO: Image Path = D:\backuplogs\FULL_20211009_123244.img</p><p>210910 12:40:55 MAIN INFO: MySQL binlog position: filename DATABASENAMEDBUAT3-bin.000072, position -1</p><p>210910 12:40:55 MAIN INFO: GTID_EXECUTED is 56be8ffc-c8b3-11ea-93d3-00505684f7cd:1-17752057:18362763,d1552329-9fff-11e9-aa0b-00505694881c:1-77</p><p><br /></p><p>-------------------------------------------------------------</p><p> Parameters Summary</p><p>-------------------------------------------------------------</p><p> Start LSN : 402744199680</p><p> End LSN : 402744486896</p><p>-------------------------------------------------------------</p><p><br /></p><p>mysqlbackup completed OK!</p><p><br /></p><p>C:\Program Files\MySQL\mysql-backup-8.0.20\bin></p><p><br /></p><p>Note: If mysqlbackup completed OK means--Backup got success.</p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-77804493813050770392023-02-05T20:39:00.001-08:002023-02-06T00:28:52.511-08:00MYSQL::To set readonly false for secondary server to forcefully to take this as primary as standalone node#read only false<p> --To set readonly false for secondary server to forcefully to take this as primary </p><p>as standalone node.</p><p>Scenario: Issue in innodb cluster and if resolution take more time to fix means,</p><p> We can take one of the node forcefully as read write from the latest gtids node.</p><p>mysql> DROP DATABASE mysql_innodb_cluster_metadata;</p><p>Query OK, 15 rows affected (0.13 sec)</p><p>mysql> SET GLOBAL READ_ONLY=0;</p><p>ERROR 2006 (HY000): MySQL server has gone away</p><p>No connection. Trying to reconnect...</p><p>Connection id: 78805</p><p>Current database: *** NONE ***</p><p>Query OK, 0 rows affected (0.00 sec)</p><p>mysql> go</p><p>Then inform application team to connect this database server ip directly in </p><p>their connection string instead of mysql router way.</p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-78368154838027945832023-02-05T19:48:00.003-08:002023-02-06T00:29:03.306-08:00MYSQL::Cluster creation and node addition after node read write made during off business hours for 3TB mysql database#createCluster #addInstance #rescan() #status<p> --Cluster creation and node addition after node read write made during </p><p>--off business hours for 3TB mysql database.</p><p>Scenario: both node of mysql innodb cluster rebooted by windows team patch by</p><p>mistake.</p><p>Split brain scenario came in to innodb cluster case. So one available mysql innodb</p><p>cluster node went into read only mode.</p><p>Resolution took more time to fix. So activated that available read only mode to</p><p>read write mode by breaking the group replication.</p><p>Mangement asked to create the cluster as like earlier at off business hours.</p><p><br /></p><p>Here are the steps to create the INNODB cluster group replication at MYSQL DATABASE.</p><p>#createCluster #addInstance #rescan() #status</p><p><br /></p><p> MySQL JS > \c adminlogin@DBCLUSTERNODEIP1:3306</p><p>Creating a session to 'adminlogin@DBCLUSTERNODEIP1:3306'</p><p>Fetching schema names for autocompletion... Press ^C to stop.</p><p>Your MySQL connection id is 75944</p><p>Server version: 8.0.20-commercial MySQL Enterprise Server - Commercial</p><p>No default schema selected; type \use <schema> to set one.</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > var cluster =dba.getCluster();</p><p>Dba.getCluster: This function is not available through a session to a standalone instance (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > var cluster =dba.getCluster();</p><p>Dba.getCluster: MySQL server has gone away (RuntimeError)</p><p>The global session got disconnected..</p><p>Attempting to reconnect to 'mysql://adminlogin@DBCLUSTERNODEIP1:3306'..</p><p>The global session was successfully reconnected.</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>TypeError: Cannot read property 'status' of undefined</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > dba.createCluster('prodclust');</p><p>A new InnoDB cluster will be created on instance 'DBCLUSTERNODEIP1:3306'.</p><p><br /></p><p>Validating instance configuration at DBCLUSTERNODEIP1:3306...</p><p><br /></p><p>This instance reports its own address as DBCLUSTERNODEIP1:3306</p><p><br /></p><p>Instance configuration is suitable.</p><p>NOTE: Group Replication will communicate with other members using 'DBCLUSTERNODEIP1:33061'. Use the localAddress option to override.</p><p><br /></p><p>Creating InnoDB cluster 'prodclust' on 'DBCLUSTERNODEIP1:3306'...</p><p><br /></p><p>Adding Seed Instance...</p><p>WARNING: User 'mysql_innodb_cluster_11'@'%' already existed at instance 'DBCLUSTERNODEIP1:3306'. It will be deleted and created again with a new password.</p><p>Cluster successfully created. Use Cluster.addInstance() to add MySQL instances.</p><p>At least 3 instances are needed for the cluster to be able to withstand up to</p><p>one server failure.</p><p><br /></p><p><Cluster:prodclust></p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>TypeError: Cannot read property 'status' of undefined</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > var cluster =dba.getCluster();</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "prodclust",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "DBCLUSTERNODEIP1:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "OK_NO_TOLERANCE",</p><p> "statusText": "Cluster is NOT tolerant to any failures.",</p><p> "topology": {</p><p> "DBCLUSTERNODEIP1:3306": {</p><p> "address": "DBCLUSTERNODEIP1:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "DBCLUSTERNODEIP1:3306"</p><p>}</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > clus.addInstance('adminlogin@DBCLUSTERNODEIP2:3306');</p><p>ReferenceError: clus is not defined</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.addInstance('adminlogin@DBCLUSTERNODEIP2:3306');</p><p>Please provide the password for 'adminlogin@DBCLUSTERNODEIP2:3306': **************</p><p>Save password for 'adminlogin@DBCLUSTERNODEIP2:3306'? [Y]es/[N]o/Ne[v]er (default No): y</p><p><br /></p><p>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.</p><p><br /></p><p>DBCLUSTERNODEIP2:3306 has the following errant GTIDs that do not exist in the cluster:</p><p>dfc8fe40-336a-11ed-a8ea-005056847352:49231601-49231871</p><p><br /></p><p>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'.</p><p><br /></p><p>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.</p><p><br /></p><p>Please select a recovery method [C]lone/[A]bort (default Abort): ^C</p><p>Cluster.addInstance: Cancelled (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "prodclust",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "DBCLUSTERNODEIP1:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "OK_NO_TOLERANCE",</p><p> "statusText": "Cluster is NOT tolerant to any failures.",</p><p> "topology": {</p><p> "DBCLUSTERNODEIP1:3306": {</p><p> "address": "DBCLUSTERNODEIP1:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "DBCLUSTERNODEIP1:3306"</p><p>}</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.addInstance('adminlogin@DBCLUSTERNODEIP3:3306');</p><p>Please provide the password for 'adminlogin@DBCLUSTERNODEIP3:3306': **************</p><p>Save password for 'adminlogin@DBCLUSTERNODEIP3:3306'? [Y]es/[N]o/Ne[v]er (default No): y</p><p><br /></p><p>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.</p><p><br /></p><p>DBCLUSTERNODEIP3:3306 has the following errant GTIDs that do not exist in the cluster:</p><p>dfc8fe40-336a-11ed-a8ea-005056847352:49231601-49231876</p><p><br /></p><p>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'.</p><p><br /></p><p>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.</p><p><br /></p><p>Please select a recovery method [C]lone/[A]bort (default Abort): C</p><p>NOTE: Group Replication will communicate with other members using 'DBCLUSTERNODEIP3:33061'. Use the localAddress option to override.</p><p><br /></p><p>Validating instance configuration at DBCLUSTERNODEIP3:3306...</p><p><br /></p><p>This instance reports its own address as DBCLUSTERNODEIP3:3306</p><p><br /></p><p>Instance configuration is suitable.</p><p>A new instance will be added to the InnoDB cluster. Depending on the amount of</p><p>data on the cluster this might take from a few seconds to several hours.</p><p><br /></p><p>Adding instance to the cluster...</p><p><br /></p><p>WARNING: User 'mysql_innodb_cluster_13'@'%' already existed at instance 'DBCLUSTERNODEIP1:3306'. It will be deleted and created again with a new password.</p><p>Monitoring recovery process of the new cluster member. Press ^C to stop monitoring and let it continue in background.</p><p>Clone based state recovery is now in progress.</p><p><br /></p><p>NOTE: A server restart is expected to happen as part of the clone process. If the</p><p>server does not support the RESTART command or does not come back after a</p><p>while, you may need to manually start it back.</p><p><br /></p><p>* Waiting for clone to finish...</p><p>NOTE: DBCLUSTERNODEIP3:3306 is being cloned from DBCLUSTERNODEIP1:3306</p><p>** Stage DROP DATA: Completed</p><p>** Clone Transfer</p><p> FILE COPY ############################################################ 100% Completed</p><p> PAGE COPY ############################################################ 100% Completed</p><p> REDO COPY ############################################################ 100% Completed</p><p><br /></p><p>NOTE: DBCLUSTERNODEIP3:3306 is shutting down...</p><p><br /></p><p>* Waiting for server restart... ready</p><p>* DBCLUSTERNODEIP3:3306 has restarted, waiting for clone to finish...</p><p>** Stage RESTART: Completed</p><p>* Clone process has finished: 3.55 TB transferred in 5 hours 50 min 18 sec (168.95 MB/s)</p><p><br /></p><p>Incremental state recovery is now in progress.</p><p><br /></p><p>* Waiting for distributed recovery to finish...</p><p>NOTE: 'DBCLUSTERNODEIP3:3306' is being recovered from 'DBCLUSTERNODEIP1:3306'</p><p>* Distributed recovery has finished</p><p><br /></p><p>Cluster.addInstance: DBCLUSTERNODEIP1:3306: MySQL server has gone away (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>Cluster.status: MySQL server has gone away (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > var cluster =dba.getCluster();</p><p>Dba.getCluster: MySQL server has gone away (RuntimeError)</p><p>The global session got disconnected..</p><p>Attempting to reconnect to 'mysql://adminlogin@DBCLUSTERNODEIP1:3306'..</p><p>The global session was successfully reconnected.</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>Cluster.status: MySQL server has gone away (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>Cluster.status: MySQL server has gone away (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > var cluster =dba.getCluster();</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "prodclust",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "DBCLUSTERNODEIP1:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "OK_NO_TOLERANCE",</p><p> "statusText": "Cluster is NOT tolerant to any failures.",</p><p> "topology": {</p><p> "DBCLUSTERNODEIP1:3306": {</p><p> "address": "DBCLUSTERNODEIP1:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "DBCLUSTERNODEIP1:3306"</p><p>}</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.rescan();</p><p>Rescanning the cluster...</p><p><br /></p><p>Result of the rescanning operation for the 'prodclust' cluster:</p><p>{</p><p> "name": "prodclust",</p><p> "newTopologyMode": null,</p><p> "newlyDiscoveredInstances": [</p><p> {</p><p> "host": "DBCLUSTERNODEIP3:3306",</p><p> "member_id": "08538d8c-ed98-11ea-852d-005056844240",</p><p> "name": null,</p><p> "version": "8.0.20"</p><p> }</p><p> ],</p><p> "unavailableInstances": []</p><p>}</p><p><br /></p><p>A new instance 'DBCLUSTERNODEIP3:3306' was discovered in the cluster.</p><p>Would you like to add it to the cluster metadata? [Y/n]: y</p><p>Adding instance to the cluster metadata...</p><p>The instance 'DBCLUSTERNODEIP3:3306' was successfully added to the cluster metadata.</p><p><br /></p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "prodclust",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "DBCLUSTERNODEIP1:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "OK_NO_TOLERANCE",</p><p> "statusText": "Cluster is NOT tolerant to any failures.",</p><p> "topology": {</p><p> "DBCLUSTERNODEIP1:3306": {</p><p> "address": "DBCLUSTERNODEIP1:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "DBCLUSTERNODEIP3:3306": {</p><p> "address": "DBCLUSTERNODEIP3:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "DBCLUSTERNODEIP1:3306"</p><p>}</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.addInstance('adminlogin@DBCLUSTERNODEIP2:3306');</p><p><br /></p><p>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.</p><p><br /></p><p>DBCLUSTERNODEIP2:3306 has the following errant GTIDs that do not exist in the cluster:</p><p>dfc8fe40-336a-11ed-a8ea-005056847352:49231601-49231871</p><p><br /></p><p>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'.</p><p><br /></p><p>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.</p><p><br /></p><p>Please select a recovery method [C]lone/[A]bort (default Abort): C</p><p>NOTE: Group Replication will communicate with other members using 'DBCLUSTERNODEIP2:33061'. Use the localAddress option to override.</p><p><br /></p><p>Validating instance configuration at DBCLUSTERNODEIP2:3306...</p><p><br /></p><p>This instance reports its own address as DBCLUSTERNODEIP2:3306</p><p><br /></p><p>Instance configuration is suitable.</p><p>A new instance will be added to the InnoDB cluster. Depending on the amount of</p><p>data on the cluster this might take from a few seconds to several hours.</p><p><br /></p><p>Adding instance to the cluster...</p><p><br /></p><p>ERROR: Unable to enable clone on the instance 'DBCLUSTERNODEIP3:3306': Recovery user 'mysql_innodb_cluster_11' not created by InnoDB Cluster</p><p><br /></p><p>WARNING: User 'mysql_innodb_cluster_12'@'%' already existed at instance 'DBCLUSTERNODEIP1:3306'. It will be deleted and created again with a new password.</p><p>Monitoring recovery process of the new cluster member. Press ^C to stop monitoring and let it continue in background.</p><p>Clone based state recovery is now in progress.</p><p><br /></p><p>NOTE: A server restart is expected to happen as part of the clone process. If the</p><p>server does not support the RESTART command or does not come back after a</p><p>while, you may need to manually start it back.</p><p><br /></p><p>* Waiting for clone to finish...</p><p>NOTE: DBCLUSTERNODEIP2:3306 is being cloned from DBCLUSTERNODEIP3:3306</p><p>** Stage DROP DATA: Completed</p><p>** Clone Transfer</p><p> FILE COPY ############################################################ 100% Completed</p><p> PAGE COPY ############################################################ 100% Completed</p><p> REDO COPY ############################################################ 100% Completed</p><p><br /></p><p>NOTE: DBCLUSTERNODEIP2:3306 is shutting down...</p><p><br /></p><p>* Waiting for server restart... ready</p><p>* DBCLUSTERNODEIP2:3306 has restarted, waiting for clone to finish...</p><p>** Stage RESTART: Completed</p><p>* Clone process has finished: 3.55 TB transferred in 5 hours 22 min 44 sec (183.33 MB/s)</p><p><br /></p><p>Incremental state recovery is now in progress.</p><p><br /></p><p>* Waiting for distributed recovery to finish...</p><p>NOTE: 'DBCLUSTERNODEIP2:3306' is being recovered from 'DBCLUSTERNODEIP1:3306'</p><p>* Distributed recovery has finished</p><p><br /></p><p>Cluster.addInstance: DBCLUSTERNODEIP1:3306: MySQL server has gone away (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>Cluster.status: MySQL server has gone away (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > var cluster =dba.getCluster();</p><p>Dba.getCluster: MySQL server has gone away (RuntimeError)</p><p>The global session got disconnected..</p><p>Attempting to reconnect to 'mysql://adminlogin@DBCLUSTERNODEIP1:3306'..</p><p>The global session was successfully reconnected.</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>Cluster.status: MySQL server has gone away (RuntimeError)</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > var cluster =dba.getCluster();</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "prodclust",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "DBCLUSTERNODEIP1:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "OK",</p><p> "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",</p><p> "topology": {</p><p> "DBCLUSTERNODEIP1:3306": {</p><p> "address": "DBCLUSTERNODEIP1:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "DBCLUSTERNODEIP3:3306": {</p><p> "address": "DBCLUSTERNODEIP3:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "DBCLUSTERNODEIP1:3306"</p><p>}</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.rescan();</p><p>Rescanning the cluster...</p><p><br /></p><p>Result of the rescanning operation for the 'prodclust' cluster:</p><p>{</p><p> "name": "prodclust",</p><p> "newTopologyMode": null,</p><p> "newlyDiscoveredInstances": [</p><p> {</p><p> "host": "DBCLUSTERNODEIP2:3306",</p><p> "member_id": "329fcb1a-c0dd-11eb-82b1-005056847352",</p><p> "name": null,</p><p> "version": "8.0.20"</p><p> }</p><p> ],</p><p> "unavailableInstances": []</p><p>}</p><p><br /></p><p>A new instance 'DBCLUSTERNODEIP2:3306' was discovered in the cluster.</p><p>Would you like to add it to the cluster metadata? [Y/n]: y</p><p>Adding instance to the cluster metadata...</p><p>The instance 'DBCLUSTERNODEIP2:3306' was successfully added to the cluster metadata.</p><p><br /></p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "prodclust",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "DBCLUSTERNODEIP1:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "OK",</p><p> "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",</p><p> "topology": {</p><p> "DBCLUSTERNODEIP1:3306": {</p><p> "address": "DBCLUSTERNODEIP1:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "DBCLUSTERNODEIP2:3306": {</p><p> "address": "DBCLUSTERNODEIP2:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "DBCLUSTERNODEIP3:3306": {</p><p> "address": "DBCLUSTERNODEIP3:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "DBCLUSTERNODEIP1:3306"</p><p>}</p><p> MySQL DBCLUSTERNODEIP1:3306 ssl JS ></p><p><br /></p><p>Note; Application Servers mysql router not able to connect means, Bootstrap of MYSQL Routers are required to connect back as like earlier.</p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-59361233166300865312023-02-05T19:31:00.001-08:002023-02-06T00:29:42.808-08:00MYSQL::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 <p> #MY-011505 Repl Plugin group_replication reported Member was expelled from the </p><p>--group due to network failures changing member status to ERROR MY-011712 MY-011735 </p><p>--Verified MISSING node ERROR node resolution#</p><p><br /></p><p>Solution: cluster.rejoinInstance("adminlogin@DBSERVER_IP:3306") at primary node .</p><p><br /></p><p>---------------------------------------------------------------------------------</p><p><br /></p><p> MySQL JS > \c adminlogin@DBSERVER_IP:3306</p><p>Creating a session to 'adminlogin@DBSERVER_IP:3306'</p><p>Fetching schema names for autocompletion... Press ^C to stop.</p><p>Your MySQL connection id is 26666197</p><p>Server version: 8.0.20-commercial MySQL Enterprise Server - Commercial</p><p>No default schema selected; type \use <schema> to set one.</p><p> MySQL DBSERVER_IP:3306 ssl JS > var cluster=dba.getCluster()</p><p> MySQL DBSERVER_IP:3306 ssl JS > cluster.status();</p><p>{</p><p> "clusterName": "uatcluster",</p><p> "defaultReplicaSet": {</p><p> "name": "default",</p><p> "primary": "DBSERVER_IP:3306",</p><p> "ssl": "REQUIRED",</p><p> "status": "OK_NO_TOLERANCE",</p><p> "statusText": "Cluster is NOT tolerant to any failures. 1 member is not active",</p><p> "topology": {</p><p> "DBSERVERIP1:3306": {</p><p> "address": "DBSERVERIP1:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "role": "HA",</p><p> "status": "(MISSING)"</p><p> },</p><p> "DBSERVER_IP:3306": {</p><p> "address": "DBSERVER_IP:3306",</p><p> "mode": "R/W",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> },</p><p> "DBSERVERIP2:3306": {</p><p> "address": "DBSERVERIP2:3306",</p><p> "mode": "R/O",</p><p> "readReplicas": {},</p><p> "replicationLag": null,</p><p> "role": "HA",</p><p> "status": "ONLINE",</p><p> "version": "8.0.20"</p><p> }</p><p> },</p><p> "topologyMode": "Single-Primary"</p><p> },</p><p> "groupInformationSourceMember": "DBSERVER_IP:3306"</p><p>}</p><p> MySQL DBSERVER_IP:3306 ssl JS > : cluster.rejoinInstance("adminlogin@DBSERVERIP1:3306")</p><p>SyntaxError: Unexpected token :</p><p> MySQL DBSERVER_IP:3306 ssl JS > cluster.rejoinInstance("adminlogin@DBSERVERIP1:3306")</p><p>Rejoining the instance to the InnoDB cluster. Depending on the original</p><p>problem that made the instance unavailable, the rejoin operation might not be</p><p>successful and further manual steps will be needed to fix the underlying</p><p>problem.</p><p><br /></p><p>Please monitor the output of the rejoin operation and take necessary action if</p><p>the instance cannot rejoin.</p><p><br /></p><p>Rejoining instance to the cluster ...</p><p><br /></p><p>The instance 'DBSERVERIP1:3306' was successfully rejoined on the cluster.</p><p><br /></p><p> MySQL DBSERVER_IP:3306 ssl JS ></p><p><br /></p><p>---------------------------------------------------------------------------------</p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-57974111171563349002023-02-05T19:21:00.002-08:002023-02-06T00:30:08.707-08:00MYSQL::How do find the list of mysql routers connecting from application servers #Mysql Router Version# List of Routers<p><b> --How do find the list of mysql routers connecting from application servers </b></p><p><b>--to mysql database innodb cluster and their version.</b></p><p><b>--How do connect mysql shell.</b></p><p>MYSQL JS >\c cluadminlogin@DBSERVER_IP:3306</p><p>--Enter the password.</p><p>--Then declare the cluster variable.</p><p>MYSQL JS >var cluster =dba.getCluster();</p><p>--cluster.listRouters(); </p><p>MySQL DBSERVER_IP:3306 ssl JS > cluster.listRouters();</p><p>{</p><p> "clusterName": "prodclust",</p><p> "routers": {</p><p> "APPSERVER_IP1::": {</p><p> "hostname": "APPSERVER_IP1",</p><p> "lastCheckIn": "2023-02-06 08:36:12",</p><p> "roPort": 6447,</p><p> "roXPort": 6449,</p><p> "rwPort": 6446,</p><p> "rwXPort": 6448,</p><p> "version": "8.0.21"</p><p> },</p><p> "APPSERVER_IP2::": {</p><p> "hostname": "APPSERVER_IP2",</p><p> "lastCheckIn": "2023-02-06 08:36:12",</p><p> "roPort": 6447,</p><p> "roXPort": 6449,</p><p> "rwPort": 6446,</p><p> "rwXPort": 6448,</p><p> "version": "8.0.24"</p><p> },</p><p> "APPSERVER_IP3::": {</p><p> "hostname": "APPSERVER_IP3",</p><p> "lastCheckIn": "2023-02-06 08:36:15",</p><p> "roPort": 6447,</p><p> "roXPort": 6449,</p><p> "rwPort": 6446,</p><p> "rwXPort": 6448,</p><p> "version": "8.0.24"</p><p> },</p><p> "APPSERVER_IP4::": {</p><p> "hostname": "APPSERVER_IP4",</p><p> "lastCheckIn": "2023-02-06 08:36:13",</p><p> "roPort": 6447,</p><p> "roXPort": 6449,</p><p> "rwPort": 6446,</p><p> "rwXPort": 6448,</p><p> "version": "8.0.24"</p><p> },</p><p> "APPSERVER_IP5::": {</p><p> "hostname": "APPSERVER_IP5",</p><p> "lastCheckIn": "2023-02-06 08:36:13",</p><p> "roPort": 6447,</p><p> "roXPort": 6449,</p><p> "rwPort": 6446,</p><p> "rwXPort": 6448,</p><p> "version": "8.0.24"</p><p> },</p><p> "APPSERVER_IP6::": {</p><p> "hostname": "APPSERVER_IP6",</p><p> "lastCheckIn": "2023-02-06 08:36:12",</p><p> "roPort": 6447,</p><p> "roXPort": 6449,</p><p> "rwPort": 6446,</p><p> "rwXPort": 6448,</p><p> "version": "8.0.24"</p><p> }</p><p>}</p><p> MySQL DBSERVER_IP:3306 ssl JS ></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p>kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-91527128869997007242017-06-09T13:41:00.000-07:002017-06-09T13:41:40.822-07:00Script to add database in existing availability group by Tsql.<div dir="ltr" style="text-align: left;" trbidi="on">
This is the script to include database in existing Always on availability group by passing below parameters.<br />
<br />
1. Primary server name, port number<br />
<br />
2.Secodnary server name , port number<br />
<br />
3. Database name<br />
<br />
4.Availability group name<br />
<br />
5.Shared path on primary server with read and write access for dba id required to take backup from primary server for HADR configuration.<br />
<br />
6. This script to be executed in SQLCMD only.<br />
<br />
<br />
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
--- YOU MUST EXECUTE THE FOLLOWING SCRIPT IN SQLCMD MODE.<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
:Connect Primary-Server_Name,5008<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
USE [master]<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
GO<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
ALTER AVAILABILITY GROUP [Availability group NAME]<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
ADD DATABASE [Database Name];<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
GO<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
:Connect Primary-Server_Name,Port_Number<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
BACKUP DATABASE [Database Name] TO DISK = N'\\Primary-Server_Name\Always_on_Backup<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
\Database Name.bak' WITH COPY_ONLY, FORMAT, INIT, SKIP, REWIND, NOUNLOAD,<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
COMPRESSION, STATS = 5<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
GO<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
:Connect Secondary-Server_Name,Port_Number<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
RESTORE DATABASE [Database Name] FROM DISK = N'\<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
\Primary-Server_Name\Always_on_Backup\Database Name.bak' WITH NORECOVERY, NOUNLOAD,<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
STATS = 5<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
GO<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
:Connect Primary-Server_Name,Port_Number<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
BACKUP LOG [Database Name] TO DISK = N'\\Primary-Server_Name\Always_on_Backup<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
\Database Name_20170609165021.trn' WITH NOFORMAT, NOINIT, NOSKIP, REWIND,<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
NOUNLOAD, COMPRESSION, STATS = 5<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
GO<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
:Connect Secondary-Server_Name,Port_Number<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
RESTORE LOG [Database Name] FROM DISK = N'\\Primary-Server_Name\Always_on_Backup<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
\Database Name_20170609165021.trn' WITH NORECOVERY, NOUNLOAD, STATS = 5<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
GO<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
:Connect Secondary-Server_Name,Port_Number<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
-- Wait for the replica to start communicating<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
begin try<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
declare @conn bit<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
declare @count int<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
declare @replica_id uniqueidentifier <o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
declare @group_id uniqueidentifier<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
set @conn = 0<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
set @count = 30 -- wait for 5 minutes <o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
if (serverproperty('IsHadrEnabled') = 1)<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
and (isnull((select member_state from master.sys.dm_hadr_cluster_members where<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
upper(member_name COLLATE Latin1_General_CI_AS) = upper(cast(serverproperty<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
('ComputerNamePhysicalNetBIOS') as nvarchar(256)) COLLATE Latin1_General_CI_AS)), 0) <><o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
0)<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
and (isnull((select state from master.sys.database_mirroring_endpoints), 1) = 0)<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
begin<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
select @group_id = ags.group_id from master.sys.availability_groups as ags where name<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
= N'Availability group NAME'<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
select @replica_id = replicas.replica_id from master.sys.availability_replicas as<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
replicas where upper(replicas.replica_server_name COLLATE Latin1_General_CI_AS) = upper<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
(@@SERVERNAME COLLATE Latin1_General_CI_AS) and group_id = @group_id<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
while @conn <> 1 and @count > 0<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
begin<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
set @conn = isnull((select connected_state from<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
master.sys.dm_hadr_availability_replica_states as states where states.replica_id =<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
@replica_id), 1)<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
if @conn = 1<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
begin<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
-- exit loop when the replica is connected, or if the query<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
cannot find the replica status<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
break<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
end<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
waitfor delay '00:00:10'<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
set @count = @count - 1<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
end<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
end<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
end try<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
begin catch<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
-- If the wait loop fails, do not stop execution of the alter database statement<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
end catch<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
ALTER DATABASE [Database Name] SET HADR AVAILABILITY GROUP = [Availability group NAME];<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
GO<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
GO<o:p></o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p> Hope adding database to an existing Always on availability group can be done in TSQL script.</o:p></div>
<div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;">
<o:p> If more number of databases to be added in Always on availability group, We can do it by repeating above steps in Sql server management studio new query window .</o:p></div>
</div>
kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-19115058580212997932017-06-06T20:58:00.001-07:002017-06-06T21:31:59.059-07:00Steps to apply patches in Always on availability group replica servers <div dir="ltr" style="text-align: left;" trbidi="on">
How do apply patch in always on availability group replica servers?<br />
<br />
1. Make sure to connect the instances using 'Multisubnetfailover=TRUE' as this required to perform failover.<br />
<br />
2.perform the patch apply in the secondary server replica .<br />
<br />
3.Reboot the secondary server replica and perform health check .<br />
<br />
4.Ensure databases are in synchronising mode in the secondary server replica .<br />
<br />
-- select * from sys. Dm_hadr_database_replica_states.<br />
<br />
Just check the synchronisation_state_desc and synchronisation_health_desc column value for health values.<br />
<br />
5.If Always on is configured in Asynchronous mode , then make sure to change it to Synchronous mode to avoid data loss.( Revert back to asynchronous mode once all steps for patch completed in both servers).<br />
<br />
Alter availability group group_name<br />
Modify replica on 'server name '<br />
<br />
With<br />
<br />
({ availability _mode =synchronous_commit|asynchronous_commit})<br />
<br />
6.Failover the Always on group to the Secondary server replica.<br />
<br />
Use master<br />
Go<br />
Alter availability group availability _group Failover<br />
Go<br />
<br />
<br />
7.Ensure databases are in synchronised mode , if no , execute the following script for all availability group databases .<br />
<br />
Use master<br />
Go<br />
Alter database database_name<br />
Set HADR resume<br />
<br />
8.Apply the patch in the old primary server(Current secondary replica)<br />
<br />
9.Reboot the old primary server and perform health check .<br />
<br />
10.Failover from old secondary server to old primary server(production)<br />
<br />
Execute below script<br />
<br />
Use master<br />
Go<br />
Alter availability group availability _group Failover<br />
Go<br />
<br />
11.Perform health check .<br />
<br />
To verify everything in place , view the dashboard of The availability group in sql server management studio.<br />
<br />
Make sure New patch got applied in both servers successfully .<br />
<br />
<br />
<br />
<br />
<br /></div>
kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-45983405939531988282017-06-06T19:30:00.000-07:002017-06-06T19:37:02.273-07:00Resume data movement for availability group databases # Resume HADR<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="color: #454545; font-family: '.SF UI Text'; font-size: 17px; line-height: normal;">
<span style="font-family: ".sfuitext"; font-size: 17pt;">while I noticed that on the secondary replica there was a pause icon next to the Availability Databases. The primary had shown both were "green", but there was an option on the secondary to </span><span style="font-family: ".sfuitext-bold"; font-size: 17pt; font-weight: bold;">Resume Data Movement</span><span style="font-family: ".sfuitext"; font-size: 17pt;">. I resumed the first database, and immediately the </span><span style="font-family: ".sfuitext-bold"; font-size: 17pt; font-weight: bold;">In Recovery</span><span style="font-family: ".sfuitext"; font-size: 17pt;"> status message was removed. </span><br />
<span style="font-family: ".sfuitext"; font-size: 17pt;"><br /></span>
<span style="font-family: ".sfuitext"; font-size: 17pt;">A minute later it changed from Not Synchronizing to Synchronized, and everything worked as expected.</span></div>
<div style="color: #454545; font-family: '.SF UI Text'; font-size: 17px; line-height: normal;">
<span style="font-family: ".sfuitext"; font-size: 17pt;"><br /></span>
<span style="font-family: ".sfuitext"; font-size: 17pt;">Note you can also use TSQL on the secondary to resume replication on multiple database at the same time:</span><br />
<span style="font-family: ".sfuitext"; font-size: 17pt;"><br /></span></div>
<div style="color: #454545; font-family: '.SF UI Text'; font-size: 17px; line-height: normal;">
<span style="font-family: ".sfuitext"; font-size: 17pt;">ALTER DATABASE [Patch] SET HADR RESUME;</span></div>
<div style="color: #454545; font-family: '.SF UI Text'; font-size: 17px; line-height: normal;">
<span style="font-family: ".sfuitext"; font-size: 17pt;">ALTER DATABASE [test] SET HADR RESUME;</span></div>
<br />
<div style="color: #454545; font-family: '.SF UI Text'; font-size: 17px; line-height: normal;">
<span style="font-family: ".sfuitext"; font-size: 17pt;">GO</span></div>
</div>
kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-73002523303082283932017-06-06T19:01:00.000-07:002017-06-06T19:27:11.296-07:00Always on availability group -HADR Questions &Answers<div dir="ltr" style="text-align: left;" trbidi="on">
What about a sync mode secondary replica of always on availability group goes offline for 3 hours and come back online it self?<br />
<br />
<u>Answer</u>:<br />
<br />
Once the secondary replica server goes offline ,data movement between replica would not happen and hence the transaction log on primary grows and keep on accumulating transactions.<br />
This would cause log file to grow;So please make sure to you have enough space in place for the log file drive in the primary replica server.<br />
<br />
Once secondary server comes online , always on group will synchronise itself to make sure primary and secondary data in SYNC Without data loss.<br />
<br />
No need to resume manually Always on availability session .MANUAL RESUME is used in manual/ planned failover.</div>
kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0tag:blogger.com,1999:blog-3672592465213854085.post-89329283681763439922015-04-09T05:08:00.000-07:002015-04-09T05:08:30.038-07:00Take a Snapshot in the vSphere Client.#Using Snapshots To Manage Virtual Machines<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal">
Here are the steps to make a snapshot.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Snapshots capture the entire state of the virtual machine at
the time you take the snapshot. You can take a snapshot when a virtual machine is
powered on, powered off, or suspended. If you are suspending a virtual machine,
wait until the suspend operation finishes before you take a snapshot.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
Enter Virtual server name or ip address, then enter the
credentials to connect to Vsphere client.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: "Arial",sans-serif; font-size: 9.0pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4vOC16xXyXRE0AiCYlUG5TbDm1X2GVzTGsN35YwdUKKrGpG8XOCHjgHZe27C50IxEb-Jd6qaA1SpuTpV_O9gvlWy95SOTnor4VpFM3a-iGtvlR36iFL81vEOrqpqBuY94rMerlTxGuGE/s1600/vm0.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4vOC16xXyXRE0AiCYlUG5TbDm1X2GVzTGsN35YwdUKKrGpG8XOCHjgHZe27C50IxEb-Jd6qaA1SpuTpV_O9gvlWy95SOTnor4VpFM3a-iGtvlR36iFL81vEOrqpqBuY94rMerlTxGuGE/s1600/vm0.jpg" /></a></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: "Arial",sans-serif; font-size: 9.0pt;"><br /></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: "Arial",sans-serif; font-size: 9.0pt;"><br /></span></div>
<div class="MsoNormal">
In Virtual Machines, find virtual server name, right-click on it. Go to Snapshot > Take Snapshot</div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQDC_c9oF4finZDZum1m-uAwHmooc9BchC5tS1JvvVGMHM5O-Met79giuArB_NmH9Hdy0EOfC_pXtveGIF8s1PeKr83vWhYwFnxu8PoA1nwe1GPJumzcXmM-3g3r2d1v5hPppfSRl95RM/s1600/vm01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQDC_c9oF4finZDZum1m-uAwHmooc9BchC5tS1JvvVGMHM5O-Met79giuArB_NmH9Hdy0EOfC_pXtveGIF8s1PeKr83vWhYwFnxu8PoA1nwe1GPJumzcXmM-3g3r2d1v5hPppfSRl95RM/s1600/vm01.jpg" height="200" width="320" /></a></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;"><br /></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;"><br /></span></div>
<div class="MsoNormal">
<span class="uicontrol"><b><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;">Inventory</span></b></span><span class="apple-converted-space"><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;"> </span></span><span class="menucascade"><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;">></span></span><span class="apple-converted-space"><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;"> <span id="GUID-878C36BA-6922-4269-8803-7FC419B947B7__UICONTROL_C14CF3B7CAAE40729F550700F2795496"></span></span><span class="uicontrol"><b><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;">Virtual Machine</span></b></span></span><span class="apple-converted-space"><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;"> </span></span><span class="menucascade"><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;">></span></span><span class="apple-converted-space"><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;"> <span id="GUID-878C36BA-6922-4269-8803-7FC419B947B7__UICONTROL_07AE6C432C6D46959DDED60139EC2D09"></span></span><span class="uicontrol"><b><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;">Snapshot</span></b></span></span><span class="apple-converted-space"><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;"> </span></span><span class="menucascade"><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;">></span></span><span class="apple-converted-space"><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;"> <span id="GUID-878C36BA-6922-4269-8803-7FC419B947B7__UICONTROL_7EE6E11A67C14D21B6B59BA50E7D09B9"></span></span><a href="https://www.blogger.com/null" name="GUID-878C36BA-6922-4269-8803-7FC419B947B" shape="rect"></a><span class="uicontrol"><b><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;">Take Snapshot</span></b></span></span><span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;">.</span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Arial, sans-serif; font-size: 9pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg61IIGaqjwW1mws1m8HKkRf2K_o5JVyBpLCk9Aq6zo7RevQ5p_VAOTb6Rwf-ififsILOA7ZK2i5TgB0vdHrtT1-dipcr0FRxoOylC0fARhT9DrYVWA6AgnAIcwwjEm_LjHjXIXIrCYucQ/s1600/VM1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg61IIGaqjwW1mws1m8HKkRf2K_o5JVyBpLCk9Aq6zo7RevQ5p_VAOTb6Rwf-ififsILOA7ZK2i5TgB0vdHrtT1-dipcr0FRxoOylC0fARhT9DrYVWA6AgnAIcwwjEm_LjHjXIXIrCYucQ/s1600/VM1.png" height="77" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="MsoNormal">
When you click on Take Snapshot. Fill out a name, and
description, and UNCHECK “Snapshot the virtual machine’s memory”.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggbQdrrUaDjAvDvdP2V4GrnI6VNwFFVc4bnJUpoK6pdEz15fatKomj9NEz_iNrKoWl96YtLIXtxkEp7SN2r5NF-m3D_tOtt6J4N1Rt-u1kyF6ntLFXOO_bB12pgRJoRE7mjeC7w3lvlPw/s1600/vm2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggbQdrrUaDjAvDvdP2V4GrnI6VNwFFVc4bnJUpoK6pdEz15fatKomj9NEz_iNrKoWl96YtLIXtxkEp7SN2r5NF-m3D_tOtt6J4N1Rt-u1kyF6ntLFXOO_bB12pgRJoRE7mjeC7w3lvlPw/s1600/vm2.png" height="272" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="MsoNormal">
Adding a date and time or a description, for example,
"Snapshot before applying XYZ patch," can help you determine which
snapshot to restore or delete.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This will create a snapshot of the virtual machine.<o:p></o:p></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
After you take the snapshot, you can view its status in the Recent
Tasks field at the bottom of the vSphere Client.<o:p></o:p></div>
</div>
kumarhttp://www.blogger.com/profile/02945783072989965297noreply@blogger.com0