Results 1 to 5 of 5

Thread: QSqlDatabase: QMYSQL driver not loaded

  1. #1
    Join Date
    Aug 2015
    Posts
    8
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default QSqlDatabase: QMYSQL driver not loaded


    Hi guys ı need some help
    help me pls

    ldd libqsqlmysql.so
    Qt Code:
    1. linux-vdso.so.1 (0x00007ffdb8bc5000)
    2. libmysqlclient_r.so.16 => /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so.16 (0x00007f54d1009000)
    3. libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f54d0dee000)
    4. libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f54d0bb7000)
    5. libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f54d099f000)
    6. libssl.so.10 => not found
    7. libcrypto.so.10 => not found
    8. libQt5Sql.so.5 => /opt/Qt/5.5/gcc_64/plugins/sqldrivers/./../../lib/libQt5Sql.so.5 (0x00007f54d075f000)
    9. libQt5Core.so.5 => /opt/Qt/5.5/gcc_64/plugins/sqldrivers/./../../lib/libQt5Core.so.5 (0x00007f54d001a000)
    10. libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f54cfdfd000)
    11. libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f54cfaf2000)
    12. libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f54cf7f1000)
    13. libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f54cf5db000)
    14. libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f54cf232000)
    15. libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f54cf02e000)
    16. libicui18n.so.54 => /opt/Qt/5.5/gcc_64/plugins/sqldrivers/./../../lib/libicui18n.so.54 (0x00007f54cebc0000)
    17. libicuuc.so.54 => /opt/Qt/5.5/gcc_64/plugins/sqldrivers/./../../lib/libicuuc.so.54 (0x00007f54ce812000)
    18. libicudata.so.54 => /opt/Qt/5.5/gcc_64/plugins/sqldrivers/./../../lib/libicudata.so.54 (0x00007f54ccde8000)
    19. libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f54ccbe6000)
    20. librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f54cc9de000)
    21. libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f54cc6cf000)
    22. /lib64/ld-linux-x86-64.so.2 (0x00007f54d175d000)
    23. libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f54cc461000)
    To copy to clipboard, switch view to plain text mode 

    Output

    Qt Code:
    1. QSqlDatabase: QMYSQL driver not loaded
    2. QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
    To copy to clipboard, switch view to plain text mode 


    code

    Qt Code:
    1. bool mysql_baglanti()
    2. {
    3. QSqlDatabase mysql = QSqlDatabase::addDatabase("QMYSQL");
    4. mysql.setHostName("localhost");
    5. mysql.setDatabaseName("data");
    6. mysql.setUserName("root");
    7. mysql.setPassword("toor");
    8.  
    9. if(!mysql.open())
    10. {
    11. QMessageBox::warning(NULL,"Hata","Veritabanına bağlanılamadı!",QMessageBox::Ok);
    12. return false;
    13. }
    14. return true;
    15. }
    To copy to clipboard, switch view to plain text mode 

    headers

    Qt Code:
    1. #include <QtSql>
    2. #include <QtSql/QSql>
    3. #include <QtSql/QSqlDatabase>
    4. #include <QtSql/QSqlDriver>
    5. #include <QtSql/QSqlQuery>
    To copy to clipboard, switch view to plain text mode 


  2. #2
    Join Date
    Aug 2015
    Location
    Gdansk, Poland
    Posts
    21
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QSqlDatabase: QMYSQL driver not loaded

    QT += sql in PRO file
    hope it can help

  3. #3
    Join Date
    Aug 2015
    Posts
    8
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: QSqlDatabase: QMYSQL driver not loaded

    Is not work

    QT += core gui
    QT += sql

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7

  4. #4
    Join Date
    Aug 2015
    Location
    Gdansk, Poland
    Posts
    21
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QSqlDatabase: QMYSQL driver not loaded


  5. #5
    Join Date
    Aug 2015
    Posts
    8
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: QSqlDatabase: QMYSQL driver not loaded

    It did not work still continues

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 prachik in forum Newbie
    Replies: 1
    Last Post: 13th January 2014, 21:40
  3. Need Help:QSqlDatabase: QMYSQL driver not loaded
    By i4ba1 in forum Qt Programming
    Replies: 1
    Last Post: 9th January 2011, 19:39
  4. QSqlDatabase: QMYSQL driver not loaded
    By lise in forum Newbie
    Replies: 3
    Last Post: 1st June 2010, 14:09
  5. Replies: 6
    Last Post: 28th April 2009, 07:58

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.