How to backup a MySQL database?
I have an account on an organizational MySQL server that is ab开发者_如何学Pythonout to expire. I have a couple of databases on this server and would like to know how to backup (mirror) the their schemas and all data in them to my local hard drive (not to another MySQL server because I'd rather not have to set one up). Is there a free tool that I can use to do this backup quickly and easily? (It has to support connecting securely and over an SSH connection.) Thanks for your help.
Yes, MySQLdump
mysqldump -u your-username -p database_name > filename
This is exactly the sort of thing that mysqldump is intended for. Just SSH into the server, run mysqldump, and scp
off your output file.
You could manually SSH to the server and run a mysqldump, but I don't think that's what you're asking about.
Personally, I'd use a program like SQLyog on Windows or Sequel Pro on Mac. Both support SSH tunneling and both have a very easy interface for mysql backups/exports.
You can use to mysqldump to get the job done.
In the control panel lookup for database tools, lick mysqladmin. Once you are there, you can back up a table, an entire database or what ever you want. There are checkbooks like do you want to export database structure only or the data too. There is bunch of options there, all GUI based. Please explore, you do not need command line.
Once you are done exporting, you can import them again using the same GUI features. There are someone in Privilages tab if I remember them correctly.
精彩评论