简体   繁体   English

有哪些可用的Java API备份mysql数据库

[英]What are the available java API to backup mysql database

是否有用于Java的API来备份mysql数据库?

You can use any Java API (through JDBC/JConnector) to backup a MySQL database. 您可以使用任何Java API(通过JDBC / JConnector)备份MySQL数据库。 But unless there is a specific reason to do, I strongly suggest that you use MySQL specific tools (eg mysqldump) to create your backups. 但是除非有特殊原因,否则我强烈建议您使用MySQL特定工具(例如mysqldump)来创建备份。

您可以使用Runtime.exec(String)运行mysqldump命令

Not sure if you are trying build a tool which would do this. 不知道您是否正在尝试构建可以执行此操作的工具。 I would suggest you to reconsider it as there are readily available tool from mysql which does this job for you. 我建议您重新考虑它,因为mysql提供了现成的工具,可以为您完成这项工作。 If you are looking for automating the backup process, then I would recommend using the unix script . 如果您正在寻找自动化备份过程,那么我建议使用unix脚本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM