take mysql backup from file system

How to take mysql backup from file system

This method or trick is important when your database crash and you are not able connect to database. Still your will be able to take mysql backup from file system. Many times we fail to restore the mysql dump from command line.

How to take mysql backup from file system

If your mysql server crash. Follow my steps to take mysql backup from file system without database connection.

First go to your filesystem.
Here I am using the fedora OS for this example

In linux go to /var/lib/mysql path

In that folder each folder means separate database.

Copy that all folders to your local machine.
again go to your mysql local installation and paste that folder into your mysql folder.

For in each database folder file you will find following types of files in the folder
db.opt
test.frm
test.MYD
test.MYI

just copy and paste in your system

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.