thecodemonkey86 / qt_mysql_driver

Typical symptom: QMYSQL driver not loaded. Solution: get pre-built Qt SQL driver plug-in required to establish a connection to MySQL / MariaDB using Qt. Download qsqlmysql.dll binaries built from official Qt source code
Other
417 stars 58 forks source link

MySQL: Unable to set the client character set to utf8 (""). Using 'utf8' instead. #17

Closed abdullah-radwan closed 3 years ago

abdullah-radwan commented 3 years ago

Hello,

I recently upgraded my app Qt version from 5.15.2 to 6.2. I can connect successfully but I always have this message while trying to do so: MySQL: Unable to set the client character set to utf8 (""). Using 'utf8' instead.

I didn't specify any character set in the connection options:

db = QSqlDatabase::addDatabase("QMYSQL", "DbOp");

db.setHostName("hostname.com");

db.setUserName("developer");

db.setPassword("password");

db.setDatabaseName("database_name");

I didn't have this message with Qt 5.15.2.

thecodemonkey86 commented 3 years ago

Hi, yes, I ran into this issue as well. I checked the source code of the driver plugin. That specific warning does not exist yet in version 5.15. I suggest you submit a bug report at https://bugreports.qt.io/secure/Dashboard.jspa

abdullah-radwan commented 3 years ago

I reported the issue: https://bugreports.qt.io/browse/QTBUG-97784

thecodemonkey86 commented 3 years ago

It appears as if this issue has already been fixed by Qt in Version 6.2.1

abdullah-radwan commented 3 years ago

Confirmed fixed in Qt 6.2.1. Thank you!