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. QMYSQL make my program crash

QMYSQL make my program crash

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 4 Posters 1.7k Views
  • 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.
  • AlexpoupetteA Offline
    AlexpoupetteA Offline
    Alexpoupette
    wrote on last edited by
    #1

    Hi guys !
    First of all sorry for my bad english, i'm not using translator but i'm a french student so i'm no very very good in english.

    If i'm here, it's because you're my last chance, i've search on internet, tried a lot of things but nothings works.

    I'am actually building a software (for my own pleasure), on this software you put a username and a password to access to the second part on the software. Of course this is connected to a database.
    I want to build this software on my PC, and put the database on my Raspberry Pi which is located in my house.
    So i first installed Xamp on my PC to try in localhost, and it didn't works. I had this message :

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
    
    

    So i placed libmysql.dll in the Qt's bin folder and it works, in local
    But when i tried to put the Raspberry Pi address like that :

     db.setHostName("192.168.0.12");
        db.setUserName("root");
        db.setPassword("");
        db.setDatabaseName("projet");
    

    The program just crash, and stop to works.

    I can't understand where is the problem ? On the Pi ? On my PC ?
    So that's my problem, thank's for help guys :)

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Can you run through the debugger to see where it crashes?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      AlexpoupetteA 1 Reply Last reply
      0
      • jsulmJ jsulm

        Can you run through the debugger to see where it crashes?

        AlexpoupetteA Offline
        AlexpoupetteA Offline
        Alexpoupette
        wrote on last edited by
        #3

        @jsulm Hi thank's for your answer !
        So i tried and my program crash when I do this :

        bRetour = db.open();
        

        When i open the database so..

        1 Reply Last reply
        0
        • jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Can you post the stack trace?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          AlexpoupetteA 1 Reply Last reply
          0
          • jsulmJ jsulm

            Can you post the stack trace?

            AlexpoupetteA Offline
            AlexpoupetteA Offline
            Alexpoupette
            wrote on last edited by
            #5

            @jsulm What do you mean by that ? You mean the the text that the deboggeur give me ? Because it's :
            "The inferior stopped it received a signal from the operation system"

            Signal name : SIGSEGV
            Signal meaning : Segmentation fault
            Or do you want something else ?

            the_T 1 Reply Last reply
            0
            • AlexpoupetteA Alexpoupette

              @jsulm What do you mean by that ? You mean the the text that the deboggeur give me ? Because it's :
              "The inferior stopped it received a signal from the operation system"

              Signal name : SIGSEGV
              Signal meaning : Segmentation fault
              Or do you want something else ?

              the_T Offline
              the_T Offline
              the_
              wrote on last edited by
              #6

              @Alexpoupette

              Is the database on your RPi configured properly?
              Are you able to connect to the database from your PC using SQL Tools?

              -- No support in PM --

              AlexpoupetteA 1 Reply Last reply
              0
              • the_T the_

                @Alexpoupette

                Is the database on your RPi configured properly?
                Are you able to connect to the database from your PC using SQL Tools?

                AlexpoupetteA Offline
                AlexpoupetteA Offline
                Alexpoupette
                wrote on last edited by Alexpoupette
                #7

                @the_ On my Raspberry PI I have changed the bind-address to 192.168.0.12. Do I need to put my public one ? (and do I have to change other parameters ?
                I don't know any SQL tools, do you have one that you can advise me ?

                EDIT: I saw that when i stop my Xamp server, my program crash too. I don't understand what's the problem, do someone know what I have to change on it to be accessible from the outsite ?

                the_T 1 Reply Last reply
                0
                • AlexpoupetteA Alexpoupette

                  @the_ On my Raspberry PI I have changed the bind-address to 192.168.0.12. Do I need to put my public one ? (and do I have to change other parameters ?
                  I don't know any SQL tools, do you have one that you can advise me ?

                  EDIT: I saw that when i stop my Xamp server, my program crash too. I don't understand what's the problem, do someone know what I have to change on it to be accessible from the outsite ?

                  the_T Offline
                  the_T Offline
                  the_
                  wrote on last edited by
                  #8

                  @Alexpoupette said:

                  I don't know any SQL tools, do you have one that you can advise me ?

                  For MySQL I use MySQL Workbench, but there may be other tools that are usefull too I dont know

                  -- No support in PM --

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Hi,

                    What version of Qt are you using ?

                    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
                    0

                    • Login

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