Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved Best practices for mysql application in QT

    General and Desktop
    2
    3
    87
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      Jorzh last edited by

      I am beginner starting to learn QT. Help me, please.
      What is the best practice to create a multi-user QT desktop application with remote MySQL (for example CRM for 10 users):

      1. One mysql user with login/password stored in an encrypted file. Desktop QT application decrypts the file in memory and connects to MySQL through internet.
      2. Every CRM user has its own MySQL user. Launching application, every user must enter his mysql login/password
      3. Desktop QT application connects, through internet, to server developed also in QT, which selects data from MySQL database, serializes result-set variable and sends it back to destkop QT app. I don't know if this way is possible in QT.
      4. Something else
      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        First thing do not ever expose a database on internet. That's a call to get hacked.

        Your further idea is better: create a proper REST service for the interactions between your application and the database. You can stay with Qt by using the Cutelyst project.

        As for your users, there are several possibilities. One of which is to use a token that has to be refreshed after some time being not used. Your users should provide a user name and password to start and then your application gets a token to continue to operate. If the user does not do anything after some timeout, the token becomes invalid and then the user should be prompted again for its credentials.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 3
        • J
          Jorzh last edited by

          SGaist, you directed me to the right way. Thank you a lot :)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post