Results 1 to 11 of 11

Thread: How to connect Qt with MYSQL??

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to connect Qt with MYSQL??

    Actually libmysql file is not there in the Qt installed location

  2. #2
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to connect Qt with MYSQL??

    This has been discussed many times in this forum and the link from 'unit' contains all the information you need, please read it.

    Also, remember that you need to install the MySQL development files (library and include files).
    After building the plugin, the libs will be located in:
    \Qt\<Qt version>\qt\plugins\sqldrivers

    at least that's the location for Qt sdk on XP with mingw.

  3. #3
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: How to connect Qt with MYSQL??

    I don't know if the OP got this issue resolved, but I'd like to add an extra piece of info for anybody else struggling with this. Make sure that you either add the path to MySQL's lib directory to your PATH or drop the libmysql.dll into the same directory as your executable. I spent hours of compiling, recompiling, installing, and uninstalling stuff thinking I had done something wrong, just to find out the DLL dependency was my issue. Hope this saves somebody else the trouble.

Similar Threads

  1. qt connect with mysql in fedora
    By sachinmcajnu in forum Qt Programming
    Replies: 1
    Last Post: 10th March 2011, 19:01
  2. Mysql unknown database, QMYSQL unable to connect
    By lixo1 in forum Qt Programming
    Replies: 3
    Last Post: 14th July 2010, 21:39
  3. Qt connect different MySQL
    By weixj2003ld in forum Qt Programming
    Replies: 0
    Last Post: 5th August 2009, 08:35
  4. How to connect MySQL with QT
    By diego in forum Qt Programming
    Replies: 0
    Last Post: 27th May 2009, 05:34
  5. VS2005+Qt4.2.2:Get a Mysql connect error.HELP!!
    By fengtian.we in forum Qt Programming
    Replies: 2
    Last Post: 20th May 2007, 12:23

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.