Results 1 to 2 of 2

Thread: QMYSQL driver not loaded

  1. #1
    Join Date
    Feb 2010
    Posts
    1
    Qt products
    Qt4

    Default QMYSQL driver not loaded

    hi,
    i'm completely new to Qt and i am trying to connect to mysql database. When i run this qt program on DEBIAN using qt creator,


    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    new1 w;

    qDebug() << QSqlDatabase::drivers();

    QSqlDatabase db( QSqlDatabase::addDatabase( "QMYSQL" ) );

    qDebug() << db.lastError();
    w.show();
    }



    i get this error...

    ("QSQLITE", "QPSQL7", "QPSQL")
    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QPSQL7 QPSQL
    QSqlError(-1, "Driver not loaded", "Driver not loaded")


    i googled a lot and dint get this working still.. can someone help me out with this???

    i happened to search the forum, dint get an answer...
    thank you..
    Last edited by akhila; 22nd February 2010 at 09:56.

  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: QMYSQL driver not loaded

    Hello akhila,

    Welcome to Qt.
    Your issue has been discussed many times, please check 'Similar Threads' further down on this page or search the forum.
    You may have to build the plugin first as this is not done by default. More info can be found here:
    http://doc.qt.nokia.com/4.6/sql-driv...l-4-and-higher

    good luck
    Last edited by schnitzel; 22nd February 2010 at 20:23.

Similar Threads

  1. QSqlDatabase: QMYSQL driver not loaded
    By onder in forum Newbie
    Replies: 12
    Last Post: 29th March 2017, 14:43
  2. Help with QMYSQL driver for QT 4.4.0: driver not loaded
    By khikho in forum Installation and Deployment
    Replies: 4
    Last Post: 1st April 2011, 15:00
  3. QSqlDatabase: QMYSQL driver not loaded
    By earthling in forum Qt Programming
    Replies: 13
    Last Post: 4th December 2010, 15:19
  4. Replies: 6
    Last Post: 28th April 2009, 06:58
  5. QMYSQL driver not loaded
    By sepehr in forum Qt Programming
    Replies: 12
    Last Post: 11th January 2009, 20: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.