Recovering MySQL DataBases on AWS instance after an unexpect_MySQL

WBOY
풀어 주다: 2016-06-01 13:14:01
원래의
1148명이 탐색했습니다.

Its possible that an AWS instance can run into various issues of unexpected crashes or can even be a case where you lost connectivity to your instance possibly due to network/firewall issue at AWS level or within your instance.  In either of these cases, you’d have no choice than to re-configure your solution on a new instances.  However, you will not have even an option to backup your MySQL DB that is running on the instance that is inaccessible.

If you have planned good and configured your WAMP solution in a way that MySQL DB Data files are relocated to a separate Volume.  In which can you can recover your MySQl DB along with instance details by using below steps:

  • Shutdown the inaccessible instance and Detach it’s Storage volumes both the local system volume (attached as/dev/sda1) as well as external storage volume (attached as/xvdf-g).
  • Launch a new instance, attach the volumes you detach from the inaccessible instance in above step
  • In the new instance, install the MySQL with a default new instance and DB.
  • Use MySQL Workbench to connect  to the newly installed DB and verify that MySQL is all running fine.
  • Then stop the MySQL DB instance from Workbench  and exit from it.
  • Now rename the “C:/Program Files/MySQL/MySQL Server 5.1” to OLD
  • Copy over the “C:/Program Files/MySQL/MySQL Server 5.1” complete folder from the system volume that you attached.
  • Then rename “C:/ProgramData/MySQL/MySQL Server 5.1/data” to New
  • Ensure you attached the MySQL DB Data files volumes with the same label on the new instance.  If not, you need to edit “C:/Program Files/MySQL/MySQL Server a5.1/my.ini” file and update the volume name
  • Now, Launch the Workbench and Start the MySQL server
  • If there are no issue with service start up, you’ll be all good to go with your MySQL DB running back with same data, users accounts and DB names
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!