Results 1 to 3 of 3

Thread: Qt 5.7 mingw 5.3 windows mariadb 10.2

  1. #1
    Join Date
    Mar 2018
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Qt 5.7 mingw 5.3 windows mariadb 10.2

    Hi everybody, it's been 10 hours i try and search around on the web what i should do to make it work but nothing. Like i wrote in the title , i wish to connect to my mariadb. Some people may say, why you don't use mysql or anything else? so the reason is my server use mariadb and it's my goal to connect my software to my online database


    1.png

    2.png

    4.jpg

    3.jpg


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

    I only need a clue where to start. I read so much docs, i really need a tips please.

    Thanks a lot

  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: Qt 5.7 mingw 5.3 windows mariadb 10.2

    i wish to connect to my mariadb. Some people may say, why you don't use mysql or anything else? so the reason is my server use mariadb and it's my goal to connect my software to my online database
    I don't understand.
    You explicitly write you are not interested in using MySql, yet you configured your project to connect to MySql.
    Why?

    Also, this is not Qt question.
    I don't know anything about mariadb, but my guess it that there is a library out there that offers API to access mariadb.
    You need to link to that library, use its API to access your mariadb.
    Forums that are dedicated to mariadb probably will be more helpful to you.

    Also, don't post screenshots of your code, pose it in as text in code tags - this will make it easier for people who want to answer you with code based on your code.
    ==========================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 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5.7 mingw 5.3 windows mariadb 10.2

    According to the MariaDB web site, MariaDB databases are supposed to be binary compatible with MySQL databases of the same version, so presumably a MySQL driver should be able to open and read them. The OP may need to install a MariaDB connector or a MySQL connector library. Like MySQL, it is not sufficient to have only the Qt-side driver, you also need the database-side driver that QMYSQL connects to.

    Edit: BTW, you will probably have to build this connector from source code unless there is already a pre-built version for mingw 5.3. A version built using MS Visual Studio's compiler probably will not be compatible with a mingw executable.
    Last edited by d_stranz; 23rd March 2018 at 19:25.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 0
    Last Post: 10th May 2017, 09:20
  2. g++ on Windows (mingw-w64)
    By mdavidjohnson in forum Newbie
    Replies: 1
    Last Post: 14th April 2016, 16:48
  3. Replies: 1
    Last Post: 19th June 2015, 14:09
  4. Qt and MariaDb driver
    By friendofgermany in forum Qt Programming
    Replies: 0
    Last Post: 26th May 2014, 09:34
  5. QT 4.2.2 Windows Mingw
    By KaptainKarl in forum Installation and Deployment
    Replies: 3
    Last Post: 4th May 2007, 14: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.