If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
You need to dump the database data and table structures into a file. Then read that file into MySQL on the new server. I've never dumped using the command line, but check the mysql pages for detailed info and which options to use. To read back in, just use '<' or 'source' from the shell.
Quote:
The most common use of mysqldump is probably for making a backup of an entire database:
shell> mysqldump --opt db_name > backup-file.sql
You can read the dump file back into the server like this:
shell> mysql db_name < backup-file.sql
Or like this:
shell> mysql -e "source /path-to-backup/backup-file.sql" db_name
mysqldump should already be included. Make sure the MySQL bin directory is in your PATH environment variable. For bash, I believe the command to set is 'export'...: export PATH=$PATH:/pathto/mysqlbin/
Or try running the command from the bin directory.
Besides mysqldump, could anyone tell me another methods to backup the entire database coz I might not know where the path of mysqldump is in other server. Thank you.