Unsolved QMYSQL make my program crash
-
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 :) -
Can you run through the debugger to see where it crashes?
-
@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..
-
Can you post the stack trace?
-
@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 ? -
Is the database on your RPi configured properly?
Are you able to connect to the database from your PC using SQL Tools? -
@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 ?
-
@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
-
Hi,
What version of Qt are you using ?