mysqlodbc retcode = SQLConnect(hdbc, (SQLCHAR*) "mysql", SQL_NTS, (SQLCHAR*)"root", SQL_NTS, (SQLCHAR *)"mysql", SQL_NTS);mysql是安装的最新版本,同时自带安装了ODBC,然后代码连接:https://msdn.microsoft.com/zh-cn/library/ms711810.aspx希望好心人帮忙调试下。QQ:185354748