Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Best practices for mysql application in QT
Forum Updated to NodeBB v4.3 + New Features

Best practices for mysql application in QT

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 292 Views 1 Watching
  • 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 Offline
    J Offline
    Jorzh
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      3
      • J Offline
        J Offline
        Jorzh
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved