从主实例切换至同城容灾实例
<p class="shortdesc">本文主要介绍如何从主实例切换至同城容灾实例。</p>
<section class="section prereq" id="primary_disaster__prereq_f1d_xbw_2tb"><div class="tasklabel"><h2 class="doc-tairway">前提条件</h2></div>
<p class="p">您已成功创建常规实例,可参考<a class="xref" href="/ssr/help/database/MySQL/Guide.IM.CIns.CCom" target="_blank" rel="external noopener">创建常规实例</a>。</p>
</section>
<section class="section context"><div class="tasklabel"><h2 class="doc-tairway">背景信息</h2></div>
<p class="p">进行容灾演练时,可使用同城容灾切换功能,手动将主实例切换至同城容灾实例。</p>
<ul class="ul" id="primary_disaster__ul_dtv_rfx_2tb">
<li class="li">常规实例主可用区发生故障时,RDS-MySQL管理控制台的同城容灾切换功能不可用。</li>
<li class="li">常规实例关联了DRDS实例时,同城容灾切换功能不可用。</li>
<li class="li">切换至同城灾备实例后,将无法执行如下操作:<ol class="ol" id="primary_disaster__ol_ex5_j4y_gsb">
<li class="li">变更实例的计算规格</li>
<li class="li">释放常规实例</li>
<li class="li">重启常规实例</li>
<li class="li">创建只读实例</li>
<li class="li">创建远程灾备实例</li>
<li class="li">开通或删除白名单</li>
<li class="li">恢复备份</li>
<li class="li">修改参数</li>
</ol></li>
</ul>
</section>
<section><div class="tasklabel"><h2 class="doc-tairway">操作步骤</h2></div><ol class="ol steps"><li class="li step">
<span class="ph cmd">以资源组管理员身份登录<a class="xref" href="https://www.ocftcloud.com/console/rds/mysql" target="_blank" rel="external noopener">RDS-MySQL管理控制台</a>。</span>
</li><li class="li step">
<span class="ph cmd">单击左侧导航栏的<span class="ph uicontrol">RDS-MySQL</span>,进入<span class="ph uicontrol">云数据库管理</span>页面。</span>
</li><li class="li step">
<span class="ph cmd">选择目标地域。</span>
</li><li class="li step">
<span class="ph cmd">单击目标实例<span class="ph uicontrol">操作</span>列的<span class="ph uicontrol">管理</span>,选择<span class="ph uicontrol">基本信息</span>页签。</span>
</li><li class="li step">
<span class="ph cmd">在<span class="ph uicontrol">同城切换</span>区域,单击<span class="ph uicontrol">同城容灾切换</span>。</span>
</li><li class="li step">
<span class="ph cmd">在<span class="ph uicontrol">同城容灾切换</span>页面,单击<span class="ph uicontrol">确认</span>。</span>
</li></ol></section>
<section class="section result"><div class="tasklabel"><h2 class="doc-tairway">执行结果</h2></div>
<ol class="ol">
<li class="li">在<span class="ph uicontrol">云数据库管理</span>页面,目标实例<span class="ph uicontrol">状态</span>显示为<span class="ph uicontrol">切换同城灾备中</span>。</li>
<li class="li">成功切换至同城灾备实例后,目标实例<span class="ph uicontrol">状态</span>显示为<span class="ph uicontrol">运行中</span>。</li>
</ol>
</section>
<section class="section postreq" id="primary_disaster__postreq_vjp_q4y_gsb"><div class="tasklabel"><h2 class="doc-tairway">后续操作</h2></div>
<p class="p">从主实例切换至同城灾备实例后,可根据如下说明访问实例。</p>
<ul class="ul" id="primary_disaster__ul_s32_r4y_gsb">
<li class="li">若主可用区无故障,则可使用主实例或同城容灾实例的域名访问RDS-MySQL实例,可参考<a class="xref" href="/ssr/help/database/MySQL/quick.Con.Linux" target="_blank" rel="external noopener">连接并访问RDS-MySQL实例</a>。</li>
<li class="li">若主可用区发生故障,则仅可使用<span class="ph uicontrol">同城容灾域名</span>访问RDS-MySQL实例。<div class="note important note_important"><span class="note__title">重要:</span>
<p class="p">使用同城容灾域名访问时,连接端口、数据库名、用户名以及密码等信息与主实例相同。</p>
</div><p class="p"><img class="image" id="primary_disaster__image_xlk_nkt_hsb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20222410144209-111c52c59f96.png"></p></li>
</ul>
</section>
提交成功!非常感谢您的反馈,我们会继续努力做到更好!