Recovering MySQL DataBases on AWS instance after an unexpect_MySQL

WBOY
Lepaskan: 2016-06-01 13:14:01
asal
1154 orang telah melayarinya

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
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan