Step1: Login into the server where mysql is hosted -
ssh username@server
Step 2: Take MySQL Dump
mysqldump dbname -u dbusername -p > filename.sql
Step 3: Logout
Logout of server
Step 4: from Local machine
scp username@server:server_path/filename.sql dumpfile.sql
The above steps can be done in 1 step.
mysqldump -h hostname -u dbusername -p dbname > filename.sql
No comments:
Post a Comment