简体   繁体   English

如何备份MySQL数据库

[英]How do I back up a MySQL database

I have created a Web Application using Java JSP and for a Database I used MySql server 5.5. 我使用Java JSP创建了一个Web应用程序,而使用MySql server 5.5创建了一个数据库。 I am running on windows and the application works just fine. 我在Windows上运行,应用程序运行正常。 My question is, where is the actual physical database stored, i can not find it anywhere on my computer, and the reason why i am asking is portability, if i copy and paste and run the project on different machine, there is a problem connecting to the database, i can recreate the schema of the database, but the actual data stored in the database i can not find it. 我的问题是,存储的实际物理数据库在哪里,我无法在我的计算机上找到它,我问的原因是可移植性,如果我复制并粘贴并在不同的机器上运行项目,则连接有问题到数据库,我可以重新创建数据库的模式,但是数据库中存储的实际数据我找不到它。

Please help 请帮忙

Use mysqldump to backup your database: 使用mysqldump备份数据库:

The mysqldump client is a backup program originally written by Igor Romanenko. mysqldump客户端是一个最初由Igor Romanenko编写的备份程序。 It can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server). 它可用于转储数据库或数据库集合以备份或传输到另一个SQL服务器(不一定是MySQL服务器)。 The dump typically contains SQL statements to create the table, populate it, or both. 转储通常包含用于创建表,填充表或两者的SQL语句。 However, mysqldump can also be used to generate files in CSV, other delimited text, or XML format. 但是,mysqldump也可用于生成CSV,其他分隔文本或XML格式的文件。

An alternative option if you don't want to use the commandline is to use a program like HeidiSQL 如果您不想使用命令行,另一种选择是使用HeidiSQL之类的程序

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

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