连接MySQL数据库小程序ConnMySQL.rar
连接MySQL数据库小程序ConnMySQL.rar
前提:MySQL正确安装,已创建好数据库与表
进行进行数据库连接
---------------------------------------------------------------------------------
//连接数据库
mysql_init(&mysql);
if(!mysql_real_connect(&mysql,"localhost","root","yulinxx","xxdb",3306,NULL,0))
{
AfxMessageBox(_T("连接错误!\n"));
用户评论