Results 1 to 4 of 4

Thread: How to connect MySql from Qt in CentOS

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Dec 2008
    Location
    France
    Posts
    93
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android
    Thanked 23 Times in 22 Posts

    Default Re: How to connect MySql from Qt in CentOS

    If you are using Qt version installed by your distrib package manager, just do :
    Qt Code:
    1. yum search qt | grep -i mysql
    To copy to clipboard, switch view to plain text mode 
    It should return a few lines, in my REL the line you are looking for is :
    Qt Code:
    1. qt4-mysql.x86_64 : MySQL drivers for Qt's SQL classes
    To copy to clipboard, switch view to plain text mode 
    But the package name change from one distrib to an onother, you have to find yours in the list.
    Install the package :
    Qt Code:
    1. yum install qt4-mysql
    To copy to clipboard, switch view to plain text mode 
    Then everything should works.

    If you are using your own built Qt lib, check during the configure if the plugin for mysql is selected, if not check the package mysql is installed with yum (it's the client for mysql), and redo configure.

  2. The following user says thank you to nix for this useful post:

    karankumar1609 (29th June 2013)

Similar Threads

  1. cannot connect to mysql in QT 4.7.2
    By vahidsamimi in forum Installation and Deployment
    Replies: 3
    Last Post: 5th September 2012, 13:55
  2. Replies: 13
    Last Post: 17th June 2011, 17:19
  3. How to connect Qt with MYSQL??
    By Gokulnathvc in forum Newbie
    Replies: 10
    Last Post: 24th March 2011, 00:52
  4. Qt connect different MySQL
    By weixj2003ld in forum Qt Programming
    Replies: 0
    Last Post: 5th August 2009, 08:35
  5. How to connect MySQL with QT
    By diego in forum Qt Programming
    Replies: 0
    Last Post: 27th May 2009, 05:34

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.