Date: Sat, 27 Aug 2005 16:09:49 -0500 From: fci <ces.fci@gmail.com> To: Carstea Catalin <carstea.catalin@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: backup and restore mysql Message-ID: <f093e36005082714093b73e2b9@mail.gmail.com> In-Reply-To: <dc6701ba0508271404996f7b1@mail.gmail.com> References: <dc6701ba0508271404996f7b1@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8/27/05, Carstea Catalin <carstea.catalin@gmail.com> wrote: > how to backup and restore mysql databases? http://dev.mysql.com/doc/mysql/en/mysqldump.html most relevent part of it ( you will need to do -u$username -p$password to l= ogin: - - snip - - 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 is also very useful for populating databases by copying data from one MySQL server to another: shell> mysqldump --opt db_name | mysql --host=3Dremote_host -C db_name It is possible to dump several databases with one command: shell> mysqldump --databases db_name1 [db_name2 ...] > my_databases.sql If you want to dump all databases, use the --all-databases option: shell> mysqldump --all-databases > all_databases.sql - - snip - - >=20 > -- > Any help would be greatly appreciated. > regards, > Carstea Catalin > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f093e36005082714093b73e2b9>