c ++ qt嵌入mysql服务器 [英] C++ qt embedded mysql server

查看:237
本文介绍了c ++ qt嵌入mysql服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用QW 5与MingW 4.7和我试图启动一个嵌入式mysql服务器程序。

I'm using QT 5 with MingW 4.7 and i'm trying to start a program with an embedded mysql server.

我当前的程序使用mysql服务器,但服务器必须手动启动(所以退出程序)。这不是用户友好的当然。

My current program uses a mysql server, but the server has to be manually started (so out of the program). This isn't user friendly of-course.

我做了一些研究,我需要使用 libmysqld库

I did some research and I need to use the libmysqld library . But I don't know how.

任何人都可以给我一个例子如何使用这个?

Can anyone give me an example how to use this?

推荐答案

您可以在Qt中使用嵌入式mysql服务器。没有那么多的困难。如果你能指出任何你面对我可以帮助你,确实你应该链接你的应用程序与libmysqld,然后只是启动一个mysql进程在你的应用程序(有很多文档可用)。但正如在评论中指出的 - 你确定你想这样做。有很多更好的嵌入式解决方案,像SQLLite(包括在Qt)...

You can use an embedded mysql server within Qt. There are no that many difficulties with that at all. If you could point any you faced I can help you with that, indeed you should link your application with libmysqld and then just start a mysql process within your application (there are plenty documentation available about that). But as was pointed in comments - are you sure you want to do that. There are many nicer embedded solutions available like SQLLite (included in Qt)...

文档和示例

您可能需要查看mysql驱动程序提供与Qt并且可能分叉为嵌入版本,但是需要有一点仔细看。但我再也没有看到真正的问题与

You probably will need to have a look on mysql driver supplied with Qt and may be fork it for embedded version, but that needs a bit closer look. But again I don't see really issues with that

这篇关于c ++ qt嵌入mysql服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆