Java,MySQL:有没有办法用Java程序嵌入MySQL服务器? [英] Java, MySQL: Is there a way to embed a MySQL server with a Java program?
问题描述
我喜欢.NET的一件事是能够将数据库文件与项目一起使用。我知道使用SQLite数据库,这可以做到,但有人用MySQL数据库后端实现了这一点吗?
One thing I love about .NET is the ability to have a database file along with the project. I know that using a SQLite database, this can be done, but did someone achieve this with a MySQL database backend?
例如,如果我运行一个java程序,它应该能够启动自己的迷你MySQL服务器并操纵数据。基本上,我想要与SQLite相同的流程,但我需要MySQL的强大功能。
So for instance, if I run a java program, it should be able to start its own mini MySQL server and manipulate data. So essentially, I want the same flow as with a SQLite but I need the power of MySQL.
推荐答案
快速搜索显示了这一点:MySQL Connector / MXJ - 用于在MySQL下载页面上的Java应用程序中嵌入MySQL服务器:
A quick search shows this: MySQL Connector/MXJ — for embedding MySQL server in Java applications on the MySQL Downloads page at:
http://dev.mysql.com/downloads/
这篇关于Java,MySQL:有没有办法用Java程序嵌入MySQL服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!