1

Replace MySql databases with a more recent copy via command line

view story
linux-howto

http://serverfault.com – Ubuntu Server running MySql server. We have 5 databases on our server. On a recent crash, the server was restored incorrectly and now 1 database (B) has 2 incorrect tables and a 2nd database (A) is completely incorrect. How do I correctly replace database files? Is it as simple as cp -a /path/to/backup/databaseA/ /var/lib/mysql/databaseA cp -a /path/to/backup/databaseB/table1.MYD /var/lib/mysql/databaseB cp -a /path/to/backup/databaseB/table1.MYI /var/lib/mysql/databaseB cp -a /path/to/backup/databaseB/table2.ibd /var/lib/mysql/databaseB And for what it is worth, there are mixed MyISA (HowTos)