Results 1 to 5 of 5

Thread: mysql driver not loaded after deployment

  1. #1
    Join Date
    Oct 2006
    Location
    Hawaii
    Posts
    130
    Thanks
    48
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default mysql driver not loaded after deployment

    I created a program that uses mysql 5.0, and it works perfectly on my windows XP test machine.

    Once I copied the program to another windows XP computer and ran it, the program works fine except I get the infamous "driver not loaded" message when I attempt to access the database. From my reading, most of the posts regarding this error are in relation to the driver not being compiled correctly, however, I assume that since it works flawlessly on my test machine, that the driver is in fact compiled fine. I ran the program and monitored file access with filemon, and can not seem to see anything that I forgot to include with the program when I copied it to the other machine. The files I copied to the machine that gives the error are:

    Qt Code:
    1. libmySQL.dll
    2. mingwm10.dll
    3. qsqlmysql4.dll
    4. QtCore4.dll
    5. QtGui4.dll
    6. QtSql4.dll
    7. qsqlmysqld4.dll
    8. program.exe
    To copy to clipboard, switch view to plain text mode 

    Are there any other files that I am missing that should be there for MySql to work?

  2. #2
    Join Date
    Oct 2006
    Location
    Hawaii
    Posts
    130
    Thanks
    48
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: mysql driver not loaded after deployment

    looks like I figured it out, it appears that the "qsqlmysql4.dll" has to be in a subdirectory called "sqldrivers" which is under the main .exe's directory. I made that change and it works fine.

  3. #3
    Join Date
    Oct 2009
    Posts
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: mysql driver not loaded after deployment

    Thank you, thank me the recipe works great.

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: mysql driver not loaded after deployment

    Thank you, thank you. After 4 hours of beating my head against the PC and reading page after page of documentation and forum notes, I found this one.

    For those "Gurus" who always reply: "Read the Docs", SHOW ME WHERE in the Qt documentation it explicitly says the SQL drivers have to be deployed in an "sqldrivers" subdirectory? There's some cryptic stuff about "The Plugin Directory" in the "Deploying Plugins" topic, but could they include a simple table that says something like "If your plugin is this type it goes in this subdirectory"? Nooooooo.

  5. #5
    Join Date
    May 2009
    Location
    Copenhagen
    Posts
    50
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: mysql driver not loaded after deployment

    You said it d_stranz. Reading this post solved my problem too after reading numerous of posts. Deploying apps with sql driver remains one of the most difficult tasks with very complicated docs that sometimes raise more confusion than solutions.

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. mysql 5 connection
    By GuL in forum Newbie
    Replies: 37
    Last Post: 18th August 2008, 15:11
  3. exception at 0x65100c40 (QtGuid4.dll)
    By sabeesh in forum Qt Programming
    Replies: 11
    Last Post: 21st December 2007, 17:10
  4. My Mysql 5 and Qt 4.2.2 Problem (Driver not loaded)
    By fengtian.we in forum Qt Programming
    Replies: 4
    Last Post: 9th February 2007, 08:11
  5. MySql plugin driver issues
    By stevey in forum Installation and Deployment
    Replies: 11
    Last Post: 20th September 2006, 13:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.