Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    QSqlDatabase: QMYSQL driver not loaded

    Installation and Deployment
    2
    4
    900
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Terminator1337 last edited by

      Hi there, I'm trying to use MySQL in my application, but for some reason the driver isn't being loaded. Right underneath that error I also get this: "QSqlDatabase: available drivers: QSQLITE, QMYSQL, QMYSQL3, QODBC, QODBC3, QPSQL, QPSQL7". Obviously it can find the driver, but it can't load it. I have MySQL loaded onto my computer and I'm just trying to connect to a test database. I have my path set to the bin folder where libmysql.dll is, but it still refuses to connect, even though it still builds. If anyone could shed some light on this problem I would be really grateful.

      Thanks!

      P.S: I'm using Windows 8.1 with MinGW 4.8.2 as the compiler

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        Can you check what error you get from QSqlDatabase ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • T
          Terminator1337 last edited by

          I get Driver not loaded

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Where did you set the PATH environment variable ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • First post
              Last post