Important: Please read the Qt Code of Conduct -

mysql connect

  • Hi. I can read from my database when the file is attached in mysql server, but when I detach the file, not surprisingly, I can't work with the database. What I want to do is to deploy my application to the end user who doesn't have mysql server installed. I know there is a kind of run-about but I am not sure exactly what it is. Every single piece of help is appreciated.

  • You can use sqlite

  • @Hamed.Masafi
    I do not want my sqlite

  • Lifetime Qt Champion

    MySQL database without server? I don't think this is possible as MySQL is server based. Maybe you can provide MySQL server together with your application. But that would be overkill.
    Why not use SQLite as Hamed.Masafi suggested? It is a very good solution for databases without server.

  • @jsulm
    I wrote the program a desktop app
    How provide MySQL server together with your application in qt?

  • Lifetime Qt Champion

    Well, this question is not related to Qt at all.
    It depends on which platform you want to deploy your application: Windows, MacOS, Linux?
    You will need to install MySQL on the target machine. Or ask your users to do so.
    I'm really wondering why you don't want to use SQLite? Instead you want to bring even more software to your users just to have a database! Is there a reason you cannot use SQLite? With SQLite you only need to provide the database file together with your application.

    One more comment: database servers are meant for server-client environments where several clients access a server. Is this the case for your application? If each user has its own database and does not share it with others, then it does not make any sense to use MySQL.

  • @jsulm said:

    it does not make
    Because I
    This is the perfect program for me with Mysql
    I want my program on Windows,I want my database for local in project

Log in to reply