C++ qt embedded mysql server

 ̄綄美尐妖づ 提交于 2020-01-03 06:35:13

问题


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

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.

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?


回答1:


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)...

Documentation and examples

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



来源:https://stackoverflow.com/questions/18092724/c-qt-embedded-mysql-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!