MySQL how to make a backup while the server is not running
You can take physical backup of mysql data directory.

Step-1 Take backup of mysql data directory.

cd /datadir/
cp -r /datadir/ /backup_path/


Step-2 Once you re-install it, just verify data are whether data are purged or not ?

Step-3 If data are not purged from datadir, Simple you need to start mysql service &amp; ready go.

Step-4 Otherwise you are suppose to copy backup datadir from backup path.

cd /datadir/
cp -r  /backup_path/ /datadir/