Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. mysql
    Log in to post

    • UNSOLVED QSqlDatabase: QMYSQL driver not loaded on Windows
      General and Desktop • c++ mysql mysql driver mysql 64bit • • jalway  

      4
      0
      Votes
      4
      Posts
      266
      Views

      Then please mark this topic as solved, thx.
    • UNSOLVED QT6.3+mysql8.0+Mac
      Qt 6 • mysql mac os qt6.3.0 • • wanning007  

      3
      0
      Votes
      3
      Posts
      141
      Views

      @JonB thx. I input was wrong.
    • UNSOLVED QSqlError("1045", "QMYSQ") Cannot edit table with QSqlTableModel
      General and Desktop • mysql qsqltablemodel qsqlerror linux desktop error 1045 • • Shellcpp73  

      9
      0
      Votes
      9
      Posts
      171
      Views

      It's or sure no problem of Qt or the QSqlTableModel - fix your access rights.
    • UNSOLVED how to insert and dipslay data from dateTimeEdit
      General and Desktop • mysql pyqt5 python3 • • lanas  

      4
      0
      Votes
      4
      Posts
      88
      Views

      Yes, Qt.EditRole and Qt.DisplayRole are the same thing in non-customised Qt classes
    • UNSOLVED mysql query does not take the dataset user inserted
      General and Desktop • python mysql python3 cursor • • lanas  

      4
      0
      Votes
      4
      Posts
      146
      Views

      @lanas Yes to all of that, by all means read that overview link. I didn't say that "will be hard to retrive data from data base if i did not work with qtsql classes". Using the Python SQL classes instead would be fine for retrieving data from the database. But when you want to display that data in your Qt UI, rows & columns from your SQL queries, that will require some coding to get the Python-SQL-fetched-data to the Qt UI widgets and back. Whereas if you use the Qt classes they fill Qt models directly, and those are what Qt QTableViews use to display (and even edit) data. In the simplest case, see if you can't use Qt's QSqlTableModel for attaching your data retrieval to the database. That will have the necessary SELECT/INSERT/UPDATE/DELETE automatically generated/issued for you for working on a SQL table in the database, without you having to write the SQL statements like you tried to in your question. And attaching a QTableView to the QSqlTableModel will display what you fetched without any code. And it can even allow you/the user to edit the data in the table and write ot back to the database for you.
    • SOLVED building qsqlmysql.dll for msvc error
      General and Desktop • mysql msvc nmake mysql driver qt5.15.1 • • mvsri  

      5
      0
      Votes
      5
      Posts
      183
      Views

      @Christian-Ehrlicher said in building qsqlmysql.dll for msvc error: Forgot to copy or typo? I forgot to copy. I looked into Makefile.Release and realised that instead of C:\mysql\include this It was including this C:\Program Files\MySQL\MySQL Server 8.0\include I deleted qmake.stash and config.cache and repeated the qmake again and this time I generated qsqlmysql.dll successfully. Tested it with Sample Cpp code in Qt, it's working. @Christian-Ehrlicher Thanks for the suggestion.
    • UNSOLVED Unable to build Qt MySQL Driver
      Mobile and Embedded • android sql mysql mariadb • • mbnoimi  

      3
      0
      Votes
      3
      Posts
      154
      Views

      Guys; May you please some help. I reached to a dead end
    • UNSOLVED How use MYSQL on QT
      General and Desktop • plugin mysql qt 5.12 plugin install • • vin212  

      2
      0
      Votes
      2
      Posts
      194
      Views

      @vin212 said in How use MYSQL on QT: MySql .................................. no ... I continue, i try this commande : nmake Why? As you can see qmake did not find your libs, so why do you think 'nmake' will do anything for mysql? As written in the documentation look into the logs and see why the libs were not found or usable.
    • SOLVED MySql (8.0.26), Windows 10, Qt 5.14.1, msvc2017_64
      Installation and Deployment • mysql driver not load qt 5.14.1 • • thatguyJoe  

      6
      0
      Votes
      6
      Posts
      223
      Views

      ended up having to walk through dependency walker to solve as some necessary dll files were not where they needed to be.
    • UNSOLVED Connect to MYSQL failed in Qt
      General and Desktop • c++ qt6 mysql mysql server • • ELEMENTICY  

      33
      0
      Votes
      33
      Posts
      1431
      Views

      @SGaist ok lemme try,if i understand what documentation say lol
    • SOLVED QT MySQL Databese connect fail
      General and Desktop • c++ mysql database qt5.9.2 localhost • • ELEMENTICY  

      4
      0
      Votes
      4
      Posts
      243
      Views

      @Christian-Ehrlicher yes,i just realize i forget to add sql to QT += core gui sql thanks for respone anyway
    • UNSOLVED converting from mySQL to SQlite with QSqlTableModel
      General and Desktop • mysql pyqt5 sqlite qsqltablemodel • • Johnny78  

      7
      0
      Votes
      7
      Posts
      450
      Views

      I did the migration with mysqldump then I edited the dump file. Then I have the resulting file into sqlite and saved it as database. The date columns are now stored in sqlite as TEXT fields. All done on a linux machine. Thank you VRonin for your suggestion. That sounds like a great idea. Can I do this in pyQt5 or do I need to go to C++? I think QSQLiteDriver is a plugin i.e. a shared library. That means I have to do this in C++. Is that right? I wanted to avoid C++ so that my application is more portable. But anyway this solution sounds great. Thanks for you answers guys.
    • SOLVED SQLite database creation
      General and Desktop • mysql database qsqlite sqllite • • Giggon  

      6
      0
      Votes
      6
      Posts
      410
      Views

      @Giggon said in SQLite database creation: Thread to be closed Please go and mark the post as solved. Thanks
    • UNSOLVED Deserializing QSqlQuery using submethod in efficient way
      C++ Gurus • mysql c++ qt • • bwylegly  

      6
      0
      Votes
      6
      Posts
      381
      Views

      No it's not, you can see that with its constructors that take a QSqlDatabase parameter. No clear is not called, the destructor is. There's no need to create QSqlQuery objects on the heap.
    • SOLVED PDF in der Datenbank in QtCreator 5.14. speichern bzw. anzeigen lassen ?
      German • mysql qt 5.14.2 pdftoqtcreator showpdf exportpdftoqt • • projectbavaria  

      8
      0
      Votes
      8
      Posts
      681
      Views

      @projectbavaria Ging es nicht darum die gelesenen Daten in eine Datei reinzuschreiben? Wenn nicht, dann sollte auch nicht von einer Datei die Rede sein, da es sonst nur verwirrt. Also, was ist das: "haben wir versucht mit QFile aber es funktioniert nicht, Qt gibt meldung raus das es keine file gibt bzw. empty"? Wo wird in dem Code irgendwas mit QFile gemacht? Wie groß ist outByteArray und was ist drin?
    • UNSOLVED Struggling with MySQL driver build
      Installation and Deployment • mysql mysql driver mingw32-make • • TTherrien  

      4
      0
      Votes
      4
      Posts
      337
      Views

      No, you have to use the same compiler that was used to build Qt. You can't mix and match C++ librairies built with MinGW and MSVC.
    • UNSOLVED Trouble building the QMYSQL Plugin on Unix (Mint 19.2)
      Installation and Deployment • mysql • • Bardfast  

      3
      0
      Votes
      3
      Posts
      425
      Views

      @Bardfast said in Trouble building the QMYSQL Plugin on Unix (Mint 19.2): $QTDIR/$QTVERSION/gcc_64/bin/qmake -- MYSQL_PREFIX=/usr/include/mysql Thank you for your reply. Unfortunately the log doesn't tell me much. The log <./Src/qtbase/src/plugins/sqldrivers/config.log> reads as follows ... Command line: MYSQL_PREFIX=/usr/include/mysql Global lib dirs: [/home/qt/openssl-1.1.1b/lib] [/usr/lib/gcc/x86_64-linux-gnu/7 /usr/lib/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib] Global inc dirs: [/home/qt/openssl-1.1.1b/include] [/usr/include/c++/7 /usr/include/x86_64-linux-gnu/c++/7 /usr/include/c++/7/backward /usr/lib/gcc/x86_64-linux-gnu/7/include /usr/local/include /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed /usr/include/x86_64-linux-gnu /usr/include] loaded result for library config.sqldrivers.libraries.db2 test config.sqldrivers.libraries.db2 succeeded loaded result for library config.sqldrivers.libraries.ibase test config.sqldrivers.libraries.ibase succeeded loaded result for library config.sqldrivers.libraries.mysql test config.sqldrivers.libraries.mysql FAILED loaded result for library config.sqldrivers.libraries.oci test config.sqldrivers.libraries.oci succeeded loaded result for library config.sqldrivers.libraries.odbc test config.sqldrivers.libraries.odbc FAILED loaded result for library config.sqldrivers.libraries.psql test config.sqldrivers.libraries.psql FAILED loaded result for library config.sqldrivers.libraries.sqlite2 test config.sqldrivers.libraries.sqlite2 succeeded loaded result for library config.sqldrivers.libraries.tds test config.sqldrivers.libraries.tds FAILED Is this the 'test' log that you were referring to?
    • UNSOLVED Qt configure could not find MySQL installation when cross compiling for raspi3?
      Mobile and Embedded • qt5 mysql cross compile raspberry pi 3 qmysql • • IMAN4K  

      6
      0
      Votes
      6
      Posts
      831
      Views

      Seems to be a bug reported here QTBUG-50244 Nobody tried to integrate MySQL for a Raspberry Pi project already ?! no workaround?! Seems strange :(
    • UNSOLVED Problem with QMYSQL
      General and Desktop • mysql library mingw qmysql libmysql • • AlexW.QT  

      8
      0
      Votes
      8
      Posts
      517
      Views

      Are you trying to move things around in the folder where you are currently doing the application deployment ?
    • SOLVED Needing help with designing a report manager app
      Brainstorm • linux windows sql mysql server • • realhamidrezakp  

      14
      0
      Votes
      14
      Posts
      2022
      Views

      what is your suggestion about server app design ? People usually refer to "server app" as "middleware" or "web application". There are tons of web frameworks and ORMs for various languages including Java and C# on "enterprise" side and scripting languages (pphp, python, perl, ruby, node.js). C++ is not really convenient language here. As for protocol, if you are not pursuing real-time data processing with lowest possible latency, it makes sense to use REST API on top of HTTP, so that on server side you have the most typical "web app" with ORM inside and REST outside, and on client side you can easily add web client if needed, and even if not, you get some additional convenience as compared to e.g. RPC over plain TCP
    • SOLVED Cannot access MySQL running on another machine
      General and Desktop • sql mysql tcp • • SnuggleKat  

      7
      0
      Votes
      7
      Posts
      1214
      Views

      @SnuggleKat said in Cannot access MySQL running on another machine: Looks like skip-networking solved the problem Could you describe what this skip-networking concept is? for the sake of completeness and benefit of documenting the case for other future users having the same issue. And if your issue is solved, please don't forget to mark your post as such. Thanks
    • SOLVED Qt 5.12 static build for webassembly: cannot configure mysql database
      Installation and Deployment • mysql qt 5.12 qt-wasm • • Baru  

      5
      0
      Votes
      5
      Posts
      1473
      Views

      @raven-worx Thanks a lot. Now, I got a perspective on how I can proceed further. I will try the solution with the QWebSocket and see how that goes. Cheers!
    • UNSOLVED SSL connection error: unknown error number QMYSQL: Unable to connect
      General and Desktop • mysql ssl ssl error • • koahnig  

      5
      0
      Votes
      5
      Posts
      2447
      Views

      @SGaist I have OpenSSL recently installed, but I am stating explicitly "no" for SSL connection option in MySql workbench. The connection give a warning, but this relates to the workbench version which seem to be higher than the actual MySql install at the web domain. No mention of SSL at all there. Since I have not really used OpenSSL I am lost on those parameters as used above. They are from the Qt document example and potentially completely wrong
    • SOLVED MySQL Stored Procedure, accessing a single result set
      General and Desktop • sql mysql qsqlquery qsqlquerymodel • • DaveK 0  

      3
      0
      Votes
      3
      Posts
      1436
      Views

      Hi, There’s also no need to allocate the query on the heap as the QSqlQueryModel::setQuery method parameter suggests.
    • SOLVED How to connect to databases in QML
      QML and Qt Quick • qml c++ mysql javascript sql server • • rywes  

      3
      0
      Votes
      3
      Posts
      3685
      Views

      @SGaist , thanks
    • UNSOLVED SQL Queries and passing to Child Dialogs, best practices?
      General and Desktop • sql mysql sqlquerymodel • • DaveK 0  

      11
      0
      Votes
      11
      Posts
      1806
      Views

      No, bad design. The child should never even know who its parent is. The correct process is to push information downstream. The child should have setters for all the data it need. The manwindow calls those setters.
    • UNSOLVED Can't connect to remote MySQL instance
      General and Desktop • mysql connect remote qt5.10 lost connection • • ChrisVT  

      14
      0
      Votes
      14
      Posts
      3513
      Views

      I may have misunderstood the case that doesn’t work. Can you maybe do a small picture with the setup ?
    • UNSOLVED QMYSQL driver not loaded in os windows
      Persian • c++ mysql database qt5.9 • • javad935  

      3
      0
      Votes
      3
      Posts
      1787
      Views

      I have add C:\mysql\mysql-5.7.21-winx64\lib into path variable. but don't work!
    • UNSOLVED How to correctly read DECIMAL values from MySQL with QSqlQuery
      General and Desktop • mysql qsqlquery • • deleted602  

      4
      0
      Votes
      4
      Posts
      1508
      Views

      As it is now, double is used. Depending on how your DECIMAL filed is configured, it might be enough. If not, then you can modify the plugin to read the field as described here.
    • UNSOLVED search working Qt development suite with working MySQL plugin on Android
      Installation and Deployment • android plugin mysql • • Allerknappe  

      3
      0
      Votes
      3
      Posts
      896
      Views

      Dear Allerknapper I have same problem and stacked long time at here . Now I have use the QT5.10.1 maybe can get succeed. I have no time on it, but i will try it from July. If you have any new progress could you update on this topic? Best regards, jeff
    • SOLVED Qt uruchamianie programu na zewnątrz, mySQL Drivers not loaded
      Polish • c++ mysql • • BartoszPaj  

      2
      0
      Votes
      2
      Posts
      986
      Views

      Zapewne już jakoś sobie poradziłeś ale gdyby nie to musisz na systemie z Win7 sprawdzić czego brakuje. Jest kilka aplikacji, które posiadają funkcjonalność Linuksowego ldd. Popatrz też na stronę: https://wiki.qt.io/Show_library_dependencies
    • UNSOLVED Library 'mysql' is not defined.
      Mobile and Embedded • mysql xampp • • RodrigoFBM  

      10
      1
      Votes
      10
      Posts
      7910
      Views

      Good afternoon. The topic is old, but still relevant to this day. I decided to try to connect MYSQL for Android. Article: https://wiki.qt.io/Build_Qt_5_MySQL_Plugin_for_Android Ct 5.10.1 I write under android Faced with difficulties.
    • SOLVED Connection to a MySQL database with Qt Creator on Windows
      General and Desktop • qtcreator mysql database • • Justin_Ahinon  

      11
      0
      Votes
      11
      Posts
      7401
      Views

      Hi, Are you aware of the implications of moving from MySQL to SQLite ? One of which is: you are using a relative path for your SQLite database which won't work if your users install your application in e.g. Program Files as it's a read-only location.
    • SOLVED Ask for help (maybe) in query.value(0).
      General and Desktop • mysql qsqlquery select • • LuAria  

      4
      0
      Votes
      4
      Posts
      971
      Views

      hi, @LuAria , wat ws the value coming in Numtwo ?. Nways ur got solution. Happy coding. Thanks,
    • SOLVED QT5.9.1 connect MySQL5.7.18
      General and Desktop • mysql qsqldatabase mac os x connection • • LuAria  

      12
      0
      Votes
      12
      Posts
      2919
      Views

      @jsulm Thanks a lot! Sorry for my miss on the link. I will try it.
    • SOLVED QMYSQL driver not loaded on mac
      General and Desktop • mysql mac os x qt5.9.1 • • LuAria  

      43
      0
      Votes
      43
      Posts
      15204
      Views

      @jsulm woooow! i add the spaces and the error disappear! REALLY REALLY thanks!!!!