Backup and Restore MySQL Database Using mysqldump Command

Using mysqldump, you can backup a local database and restore it on a remote database at the same time, using a single command. In this article, let us review several practical examples on how to use mysqldump to backup and restore.

----------------------------------------------------------------------------------------------------------------------------------------

backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql 
 
restore:# mysql -u root -p[root_password] [database_name] < dumpfilename.sql  

No comments:

Post a Comment

Start and Stop ssh-agent

Below is the bash script used to start and stop ss-agent #!/bin/bash ## in .bash_profile SSHAGENT=`which ssh-agent` SSHAGENTARGS="...