Wednesday, March 17, 2021

Back Up Mysql Data When its Service Dump (Ubuntu)

 1- Backup /var/lib/mysql to other location

2- Reinstalling MySQL may solve the problem, but should only be used as a last resort! To reinstall:

sudo apt purge mysql-server mysql-common

sudo apt autoremove mysql-server mysql-common

and reinstall it again

sudo apt-get update sudo apt-get install mysql-server


3- copy backup to /var/lib/mysql 


or in case it is not override old database  please reverse backup



No comments:

Post a Comment