You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.



  • "kus_hal03" is male
  • "kus_hal03" started this thread

Posts: 1

Location: Nagpur,Maharashtra, India

Occupation: Software Engineer

  • Send private message


Saturday, May 28th 2011, 6:25am

QT connectivity with MySQL

Hello Friends,
I have database in MySQL, which I want to connect using qt4.6 but I am getting error that I have only QSQLITE, but I want it to be connected using QMYSQL, So I am getting driver of mysql to connect with qt. Please help me.. If any one having driver regarding QMYSQL please tell me the link or mail me on




  • "tomasstr" is male

Posts: 35

Location: Vilnius, Lithuania

  • Send private message


Sunday, June 19th 2011, 9:14am

You didn't tell which OS are you using.

On linux it is simple, just type something like:

Source code

yum install qt-mysql

On windows it is much more complicated, you will probably have to compile mysql drivers from qt source...



  • "creatron" is male

Posts: 8

Location: South Africa, Midrand

Occupation: Senior Hardware Eng

  • Send private message


Sunday, June 19th 2011, 5:21pm

QT connectivity with MySQL

If you use QtCreator you need a plug-in. A easy way is to install the mysql driver from the system (Suse Yast, Ubuntu synatic package manager etc) and then copy the so file from /usr/lib/qt4/plugins/sqldrivers/ to /opt/'qtsdk dir'/qt/plugins/sqldrivers ( the file are Your directory could be different.

Similar threads

Used tags

MySql, QT 4.6