I made a update on my mac to catalina few days ago. After this my MySQL-Server was broken and I would like to reinstall it. Before doing this I would like to make a backup of my database. Because the server is not running I can't use mysqldump or phpMyAdmin. Is it enough to save the directory /usr/local/mysql/data/ or is there anything else I should do?

Thanks Thomas

  • Saving the directory tree will at least let you get back to where you are now.
    – Rick James
    Jan 28, 2020 at 4:43

1 Answer 1


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 & ready go.

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.