Maison > base de données > tutoriel mysql > le corps du texte

Recovering MySQL DataBases on AWS instance after an unexpect_MySQL

WBOY
Libérer: 2016-06-01 13:14:01
original
1126 Les gens l'ont consulté

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
source:php.cn
Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Tutoriels populaires
Plus>
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!