qt5.11 64bits+mysql8 64bits可以看這個(gè),否則是32bits可以參考StackOverflow
最終解決方案有兩種,一種是使用ODBC
一種更為簡(jiǎn)單的是直接拷貝文件.
網(wǎng)絡(luò)上其他的直接拷貝64bits的方法再此版本中不可用,就算沒(méi)有出現(xiàn)QSqlDatabase: QMYSQL driver not loaded也會(huì)出現(xiàn)進(jìn)入不了數(shù)據(jù)庫(kù)的情況。
順便標(biāo)記下知識(shí)點(diǎn),mysql8后不可以再語(yǔ)句二合一
Starting with MySQL 8 you no longer can (implicitly) create a user using the GRANT command. Use CREATE USER instead, followed by the GRANT statement:
mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'root';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;