mysqldump -u root -p database0 > /tmp/database0.sql
mysql -u root -p -e ‘create database database0_bkp’
mysql -u root -p database0_bkp < /tmp/database0.sql
mysql -u root -p database0 -e 'insert into database0.table_you_want select * from database0_bkp.table_you_want'
restore one mysql table
Leave a reply