HOWTO: Recover from old MySQL data files
07 Mar 2005Reminder for myself.
So you've got some backed-up MySQL table files (if that's the right
term), rather than a proper dump. Untar them somewhere, and note the
path to the data files -- say, /home/foo/mysql_recovery/data
. Copy
/etc/my.cnf
to your home directory. Edit it and change the port to
something different -- say, 3307. Run:
/usr/local/mysql/bin/mysqld --defaults-file=/home/foo/my.cnf --datadir=/home/foo/mysql_recover/data
Then run:
mysqldump -P 3307 --opt -u foo -p database > recovery.sql
Of course, all this could be prevented if you were running mysqldump nightly instead of just copying the data directories...
Add a comment:
Name and email required; email is not displayed.
Related Posts
QRP weekend 08 Oct 2018
Open Source Cubesat Workshop 2018 03 Oct 2018
mpd crash? try removing files in /var/lib/mpd/ 11 Aug 2018