Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cannot find mysql drivers
QtWS25 Last Chance

Cannot find mysql drivers

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
mysql driverandroidqtsql databaseqsqldatabase
2 Posts 2 Posters 296 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.
  • A Offline
    A Offline
    Andrew_T
    wrote on 29 Aug 2023, 15:02 last edited by
    #1

    Hello
    I am struggling with the mysql driver for android.
    I successfully installed the mysql driver for my pc and on the qt creator the app connects to my database without any problem.
    But when I tried to put my app on the phone, i got errors, and then, I printed the available drivers for QSqlDatabase into qDebug while lauching on the phone and there showed only the QSqlite driver.
    I tried installing it but I don't know exactly what am I looking for.
    If you can help me, i would be grateful.
    775e1396-5140-4e05-9cc1-42fa182308d6-image.png

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 29 Aug 2023, 18:30 last edited by
      #2

      Hi and welcome to devnet,

      There's no prebuilt MySQL for Androïd. If you really want that you'll have to first build the MariaDB client library for Androïd and then the MariaDB driver.

      That said, when people try to access a MySQL database directly like that from Androïd, it means they are planning to expose their server directly on internet which is a very bad idea. The recommendation is to have a REST api in front of the database that will return only required data and also abstract the database itself.

      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
      1

      1/2

      29 Aug 2023, 15:02

      • Login

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