Results 1 to 8 of 8

Thread: MySql Problem

  1. #1
    Join Date
    Jan 2007
    Location
    Chennai, India
    Posts
    25
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default MySql Problem

    Hi,

    I have Qt Application which is connected with MySql. In my machine its works fine.
    But when i run it in a fresh machine Windows XP where QT and MySQL is not installed, the connection is not established with mysql. I added libmySQL.dll. Still it is not connected. Whether I need to add any other .dll?

    Can please somebody tell me what i should do to make it work.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: MySql Problem

    Do you have MySQL installed?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: MySql Problem

    Quote Originally Posted by high_flyer View Post
    Do you have MySQL installed?
    To clarify, this question means: "Did you copy the mysql client dll (from MySQL installation) to the target machine?"

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: MySql Problem

    hehe... correct wysota
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: MySql Problem

    Quote Originally Posted by high_flyer View Post
    hehe... correct wysota
    I knew you'd agree

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MySql Problem

    Quote Originally Posted by vishesh View Post
    I added libmySQL.dll. Still it is not connected.
    Where did you place that DLL? It should be in the same directory where your executable is. Also check with Dependency Walker whether it doesn't need any additional DLLs.

    Do you have qmysql.dll plugin (or whatever it's called) in sqldrivers subdirectory in the directory where your executable is?

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: MySql Problem

    To summarise, your directory tree should look like this:

    Qt Code:
    1. yourapplicationbinary.exe
    2. libmysql.dll (or whatever it is called)
    3. qt-mt.dll
    4. sqldrivers\
    5. +-------- qsqlmysql3.dll (or whatever it is called)
    To copy to clipboard, switch view to plain text mode 

    Alternatively libmysql.dll and qt-mt.dll might be in your WINDOWS\System directory.

  8. #8
    Join Date
    Jan 2007
    Location
    Chennai, India
    Posts
    25
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: MySql Problem

    Thanks to everyone.

    If MySql is installed in that machine, then it works fine.

Similar Threads

  1. Mysql LD_LIBRARY_PATH Issue
    By Think_Positive in forum Installation and Deployment
    Replies: 3
    Last Post: 13th February 2007, 19:16
  2. 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
  3. Qt 4.1.4 & Mysql 5 on Linux x64
    By bothapn in forum Installation and Deployment
    Replies: 7
    Last Post: 4th August 2006, 13:23
  4. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.