Qt database(mysql) application does not connect to database when deployed on another computer -
i new qt bare me . built qt application connects , queries database using mysql . works fine on development computer (the computer qt creator on it). when deploy using windeployqt.exe
, run on computer doesn't connect database odd reason.
note have working database (mysql aswell) on other computer (the 1 fails connect database)
i'm not sure , tried using addlibrarypaths
didn't work (im not sure if did correctly).
i'm using :
- mysql server 5.5.36
- workbench 6.0
- qt creator 5.4.0
i tried looking statically building application failed understand procedures in doing so.
i appreciate if of qt gods this.
i found problem , solved it.
problem: reason target computer wasnt recognizing or reading libmysql.dll in c:\windows ,and @marco used db.lasterror , got application display error , "driver not loaded driver not loaded" meant there wrong libmysql.dll (note copied dll mysql folder installed on target machine )
solution : had copy libmysql.dll development machine , place in c:\windows on target machine (i noticed libmysql.dll on target machine smaller in size 1 used on development machine) reason program operates when libmysql.dll development machine present in c:\windows in target machine
this solution should fix "driver not loaded" or "qmysql driver not loaded "(etc) errors . trying , again @macro