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. How to Connect mysql database in Raspberry Pi 3
QtWS25 Last Chance

How to Connect mysql database in Raspberry Pi 3

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 485 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.
  • Ketan__Patel__0011K Offline
    Ketan__Patel__0011K Offline
    Ketan__Patel__0011
    wrote on last edited by
    #1

    Hello Friends

    Currently I am working on Raspberry pi 3

    i was install mysql
    and try to established connection

    my code Is :

    QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
    db.setHostName("127.0.0.1");
    db.setPort(3306);
    db.setUserName("root");
    db.setDatabaseName("Demo");
    db.setPassword("Password");
    

    outPut Is :

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE

    please Help To slove this Problem

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      I think you have to compile the Qt plugin also
      https://forum.qt.io/topic/40672/how-to-create-the-plugin-of-mysql-for-qt
      This must be done with the arms compiler for Pi and then copy the resulting files to it.

      https://forum.qt.io/topic/71972/how-to-add-qmysql-driver-for-raspberry-pi

      1 Reply Last reply
      1

      • Login

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