Frequently used Putty commands

Database Dump:
mysqldump -u username -h localhost -p dbname > filename.sql

Import Database Dump:
mysql -u username -p -h localhost DATA-BASE-NAME < data.sql

Tar a folder:
tar -cv foldername > foldername.tar

GZip the tar file:
gzip foldername.tar

Extract tar.gz file:
tar -zxvf yourfile.tar.gz

Extract .bz2 file:
bunzip2  yourfile.bz2

Extract tar.bz2file:
tar jxf backup.tar.bz2

Copy files from source to destination:
scp local.xml username@hostnameORipaddress:FullFolderTargetPath

All the above commands require password.

Issues with MySql Dump:
mysqldump: Got error: 1016: Can’t open file: … (errno: 24) when using LOCK TABLES

Check and change the file permissions:

mysqldump: Got error: 1016:

Leave a Reply

Your email address will not be published. Required fields are marked *