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学习者快速成长!