My environment is win10. Exe files are generated by qt5.12.6 + MySQL 5.7.29.
Run exe to find that the database cannot be connected, and the error is as follows:
QSqlDatabase：QMYSQL driver not loaded
Open datatabase error：”Driver not loaded Driver not loaded”
I watched it online for two days and tried it for two days, but there was no change. But after a comprehensive analysis, it will be solved.
1. Copy libmysql.dll under D: \ MySQL \ mysql-5.7.29-winx64 \ lib to the directory of. Exe;
2. Copy the D: \ QT \ qt5.12.6 \ 5.12.6 \ SRC \ qtbase \ SRC \ plugins \ sqldrivers \ plugins \ sqldrivers folder to the directory of. Exe.
The above paths are different according to the actual situation of individuals, and are based on their own local.
After completing the above steps, EXE can connect to the database.
weixin_ thirty million three hundred and ninety-nine thousand eight hundred and twenty-one
weixin_ forty-five million seven hundred and thirty-eight thousand two hundred and eighteen
- Docker starts MySQL container and reports an error driver failed programming external connectivity on endpoint mysq
- Vs2019 + QT parses the XML file and reports an error at doc.setcontent (& file)
- MySQL driver compiling method of QT under windows and solutions to abnormal errors
- The file server reports an error of 413, and the file uploaded by nginx reports an error of 413 request entity too large
- Vs + QT reports an error “vs cannot open the source file qchartview”
- Arduino reports an error when writing a custom library file to solve the problem of not name of type, not declared in this scope
- Golang MySQL error SQL: unknown driver “MySQL” (Forgotten import?) solution
- Vue console reports an error duplicate keys detected: ‘XXXX’. This may cause an update error. Solution
- Zeppelin uses spark to connect to MySQL and reports an error
- The echots in Vue reports an error. After obtaining the DOM element, the chart can be displayed. The console still reports an error
- Mysql reports an error Operand should contain 1 column(s)
- HTML method IE8 reports an error, IE8 jQuery Ajax obtains static resources reports an error, typeerror denies access
- Hadoop reports an error. Cannot access scala.serializable and python MapReduce reports an error
- Unit Android converts c# class to JSON file and reports an error
- When a system is deployed on weblogic22.214.171.124, it reports an error “IllegalStateException zip file closed”. When it is deployed on weblogic126.96.36.199, it does not report an error and can be accessed normally.
- java.lang.ClassNotFoundException : com.mysql.jdbc . driver project cannot connect to database, exception, lack of MySQL driver
- Vue introduction path is correct, but it always reports an error: already included file name‘ ×××‘ differs from file name ‘ ×××‘ only in casing.
- Lamdba in the studio part reports an error. Observe lamdba reports an error but can run
- When Jenkins deploys the project, GIT reports an error fatal: index file smaller than expected
- Dm7 Dameng database dmrman reports an error OS_ pipe2_ conn_ Server open failed solution