[PySide] QMYSQL

Cristián Maureira-Fredes Cristian.Maureira-Fredes at qt.io
Mon Oct 26 09:37:39 CET 2020


Hello Angelo,

Here is the documentation on how to use QMYSQL

https://doc.qt.io/qt-5/sql-driver.html#qmysql

In summary, you need to build the plugin from qtbase,
and build pyside from source since we don't package that plugin with
PySide.
As you might have read, the only plugins we provide
are QSQLITE, QPSQL, and QODBC.

Cheers

On 10/25/20 6:33 PM, Angelo Ballabio wrote:
> When I create a virtual environment and loaded PySide2 into it, I 
> realized that I cannot access MySQL database through 
> QSqlDatabase.addDatabase("QMYSQL"), checking I saw that the 
> libsqlmysql.so driver is not present in the sqldrivers directory along 
> with the others. I tried to search the internet for the file in 
> question, and nothing on the qt.io <http://qt.io/> website, and also on 
> mysql.com <http://mysql.com/> I can't find the file. if i use the one 
> installed in my ubuntu 20.10 distribution it tells me that it is not 
> compatible with the others. In a standard environment its does. Anyone 
> have a solution to suggest?
> 
> Angelo
> 
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> https://lists.qt-project.org/listinfo/pyside
> 

-- 
Dr. Cristián Maureira-Fredes
R&D Manager

The Qt Company GmbH
Erich-Thilo-Str. 10
D-12489 Berlin

Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht
Charlottenburg, HRB 144331 B


More information about the PySide mailing list