With this command :
mysqldump -uuser -ppass dbname > 1.sql
You can dump dbname to 1.sql
I want a way to dump and restore just 1 table of dbname from ssh and command line
You can just add a tablename to your command
mysqldump -uuser -ppass dbname tablename >1.sql
mysql -uuser -ppass -e "create database dbname;"
mysql -uuser -ppass dbname <1.sql
You may want to look at the mysqldump and mysql man pages for further information.
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
3 years ago