The cause of this error is that the computer used is 64-bit, but the MySQL 64-bit ODBC driver and the qt odbc driver do not know where it is incompatible, so the connection may fail. Reinstall MySQL's 32-bit ODBC driver for configuration, and connect again (64-bit and 32-bit drivers can work normally, this is not scientific = ).
= ==================================
P.s.: remote connection to the database is really not difficult. It is easy to use the interface provided by MySQL. h In vs, but there are various bugs when porting to QT. Starting from Thursday, we have struggled with header files such as MySQL. h and winsock2.h. I wanted to compile the MySQL driver of QT on Friday, so I had to worry about it until noon on Saturday. From noon till now, when I used ODBC connections, I encountered the above unreasonable bug, so I was unable to speak. Fortunately, it was finally done and relieved.