如何备份MySQL数据库?
我在组织 MySQL 服务器上有一个即将过期的帐户。我在这台服务器上有几个数据库,想知道如何将它们的架构和其中的所有数据备份(镜像)到我的本地硬盘驱动器(而不是另一台 MySQL 服务器,因为我不想设置一个) )。有没有免费的工具可以让我快速轻松地进行备份? (它必须支持通过 SSH 连接安全连接。)感谢您的帮助。
I have an account on an organizational MySQL server that is about 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
是的, MySQLdump
mysqldump -u 你的用户名 - p 数据库名称 >文件名
Yes, MySQLdump
mysqldump -u your-username -p database_name > filename
这正是 mysqldump< 的事情/a> 的目的是。只需通过 SSH 连接到服务器,运行 mysqldump,然后使用
scp
关闭输出文件。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.您可以手动通过 SSH 连接到服务器并运行 mysqldump,但我认为这不是您要问的。
就我个人而言,我会在 Windows 上使用 SQLyog 或 Mac 上的 Sequel Pro。两者都支持 SSH 隧道,并且都有一个非常简单的 mysql 备份/导出界面。
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.
您可以使用mysqldump来完成工作。
You can use to mysqldump to get the job done.
在控制面板查找数据库工具中,单击 mysqladmin。到达那里后,您可以备份表、整个数据库或任何您想要的内容。有一些支票簿,例如您想仅导出数据库结构还是也导出数据。那里有很多选项,全部基于 GUI。请探索,您不需要命令行。
完成导出后,您可以使用相同的 GUI 功能再次导入它们。如果我没记错的话,“特权”选项卡中有一个人。
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.