Results 1 to 4 of 4

Thread: QMYSQL driver not loaded

  1. #1
    Join Date
    May 2011
    Posts
    39
    Thanks
    15
    Qt products
    Qt4
    Platforms
    Windows

    Default QMYSQL driver not loaded

    I want to make a connection with mysql workbench. I have created table in mysql workbench but I am getting this problem when simply adding database connection
    Qt Code:
    1. QSqlDatabase db=QSqlDatabase::addDatabase("QMYSQL");
    To copy to clipboard, switch view to plain text mode 
    Error:::QSqlDatabase: QMYSQL driver not loaded
    please help me regarding this.

  2. #2
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMYSQL driver not loaded

    Hi,

    Are you working on Linux or Windows?

    If you are working on Windows you need to build the Mysql plugin yourself.

    Carlos.

  3. #3
    Join Date
    May 2011
    Posts
    39
    Thanks
    15
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QMYSQL driver not loaded

    I am working on windows...
    Please Explain me how to build the Mysql Plugin??

  4. #4
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMYSQL driver not loaded

    Hi,

    1. Get MySQL community server. Download the ZIP Archive.
    2. Get the sources of QT
    3. Follow the step "How to build the MySQL driver for MinGW users" from http://doc.qt.nokia.com/4.7/sql-driver.html#qmysql

    Carlos.

Similar Threads

  1. QSqlDatabase: QMYSQL driver not loaded
    By onder in forum Newbie
    Replies: 12
    Last Post: 29th March 2017, 15:43
  2. QSqlDatabase: QMYSQL driver not loaded
    By earthling in forum Qt Programming
    Replies: 13
    Last Post: 4th December 2010, 16:19
  3. QMYSQL driver not loaded
    By cydside in forum Qt Programming
    Replies: 4
    Last Post: 31st March 2010, 03:18
  4. QMYSQL driver not loaded
    By akhila in forum Newbie
    Replies: 1
    Last Post: 22nd February 2010, 19:24
  5. QMYSQL driver not loaded
    By sepehr in forum Qt Programming
    Replies: 12
    Last Post: 11th January 2009, 21:15

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.