As loaded by python:
0x00007ffff2dd4460 0x00007ffff2e0304e Yes (*) /lib/x86_64-linux-gnu/libQt5Sql.so.5
I was trying to get a different POV on the same lib, removing python out of the picture.
Install mysql and create a DB.
$ apt install mysql-server
$ systemctl start mysql
$ systemctl status mysql
$ mysql -u root
mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'user_password';
mysql> CREATE DATABASE test;
mysql> GRANT ALL PRIVILEGES ON test.* TO 'newuser'@'localhost';
mysql> USE test;
mysql> CREATE TABLE testtable (id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY);
Test Program:
# cat mysqlqt.pro
######################################################################
# Automatically generated by qmake (3.1) Tue Aug 4 12:46:45 2020
######################################################################
# The following define makes your compiler warn you if you use any
# feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
As loaded by python: 64-linux- gnu/libQt5Sql. so.5
0x00007ffff2dd4460 0x00007ffff2e0304e Yes (*) /lib/x86_
I was trying to get a different POV on the same lib, removing python out of the picture.
Install mysql and create a DB.
$ apt install mysql-server @'localhost' IDENTIFIED BY 'user_password'; @'localhost' ;
$ systemctl start mysql
$ systemctl status mysql
$ mysql -u root
mysql> CREATE USER 'newuser'
mysql> CREATE DATABASE test;
mysql> GRANT ALL PRIVILEGES ON test.* TO 'newuser'
mysql> USE test;
mysql> CREATE TABLE testtable (id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY);
Test Program:
# cat mysqlqt.pro ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### #######
#######
# Automatically generated by qmake (3.1) Tue Aug 4 12:46:45 2020
#######
TEMPLATE = app x86_64- linux-gnu/ qt5 x86_64- linux-gnu/ qt5/QtCore x86_64- linux-gnu/ qt5/QtGui x86_64- linux-gnu/ qt5/QtWidgets
TARGET = mysqlqt
INCLUDEPATH += .
INCLUDEPATH += /usr/include/
INCLUDEPATH += /usr/include/
INCLUDEPATH += /usr/include/
INCLUDEPATH += /usr/include/
QT += core gui sql QT_MAJOR_ VERSION, 4): QT += widgets
greaterThan(
# The following define makes your compiler warn you if you use any WARNINGS
# feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_
# You can also make your code fail to compile if you use deprecated APIs. DEPRECATED_ BEFORE= 0x060000 # disables all the APIs deprecated before Qt 6.0.0
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_
# Input
SOURCES += mysqlqt.cpp
# cat mysqlqt.cpp
#include <QApplication>
#include <QPushButton>
#include <QSqlDatabase>
int main() :drivers( );
qDebug( "driver: %s", qUtf8Printable( drivers[ i]));
{
QStringList drivers = QSqlDatabase:
for(int i=0 ; i < drivers.length() ; i++) {
}
QSqlDatabase db = QSqlDatabase: :addDatabase( "QMYSQL" ); setHostName( "localhost" ); setDatabaseName ("test" ); setUserName( "newuser" ); setPassword( "user_password" );
db.
db.
db.
db.
bool ok = db.open();
qDebug("ok %i isopen %i isvalid %i", ok, db.isOpen(), db.isValid()); "db-driver %s", qUtf8Printable( db.driverName( )));
qDebug(
qDebug("# start tables");
qDebug( "table: %s", qUtf8Printable( tables[ i]));
QStringList tables = db.tables();
for(int i=0 ; i < tables.length() ; i++) {
}
qDebug("# end tables");
return ok;
}
$ ./mysqlqt
driver: QSQLITE
driver: QMYSQL
driver: QMYSQL3
ok 1 isopen 1 isvalid 1
db-driver QMYSQL
# start tables
table: testtable
# end tables
So the QMYSQL isn't generally disfunctional since this update, it must be related to something more specific in the python wrapping of it.