Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I can't connecte mysql database?

I can't connecte mysql database?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.3k Views
  • 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.
  • F Offline
    F Offline
    foxgod
    wrote on last edited by
    #1

    my version is QT5.2.1 and there is qmysql.dll in plugins\sqldrivers ,mysql version is mysql-5.5.28-winx64 .my os is windows7. but when i connecte database ,there is some eroor----QSqlDatabase: QMYSQL driver not loaded, i don't know why,

    there is anthoer question .only one man can connect mysql by qt5.2.1,but he can't update database table by
    int USessionId= 100;
    query.prepare("UPDATE users SET SessionId = ? WHERE UserId = userID");
    query.bindValue(0,USessionId);
    query.exec();
    QSqlError(2036, "QMYSQL3: Unable to bind value", "Using unsupported buffer type: 3735604 (parameter: 1)")
    who can tell where is worng?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MrMNight
      wrote on last edited by
      #2

      first question: in program folder you must create directory "sqldrivers" and put there file "qsqlmysql4.dll" (for qt 4.8.x, for qt5 i think something simillar).
      In your program folder you have to put files: libmysql.dll, QtSql4.dll (obv for Qt5 i think it would be QtSql5.dll)

      1 Reply Last reply
      0
      • F Offline
        F Offline
        foxgod
        wrote on last edited by
        #3

        NO ,there is folder int C:\Qt5.2.1\5.2.1\mingw48_32\plugins\sqldrivers

        there is also libmysql.dll Qt5Sql.dll in C:\Qt5.2.1\5.2.1\mingw48_32\bin

        who can tell me where is worng?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MrMNight
          wrote on last edited by
          #4

          Do you trying to build your program or directly run binary file you already builded?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved