ITPub博客

首页 > 数据库 > MySQL > vc 6 mysql使用c 接口访问mysql

vc 6 mysql使用c 接口访问mysql

原创 MySQL 作者:jidongzheng 时间:2010-04-14 12:49:23 0 删除 编辑

基本开发就不讲了,以下主要是出现的几个问题,提供一下解决方法:

1. 找不到c:mysqlshareindex?.conf

Some mysql struct information (size and offset):
net: 292 0
host: 4 296
port: 4 400
protocol_version: 4 412
thread_id: 4 392
affected_rows: 8 368
packet_length: 4 396
status: 4 512
fields: 4 332
field_alloc: 32 336
free_me: 1 516
options: 84 428

File 'c:mysqlsharecharsets?.conf' not found (Errcode: 2)
Character set '#33' is not a compiled character set and is not specified in the
'c:mysqlsharecharsetsIndex' file
Can't connect to the mysql server on port 3306 !
Press any key to continue

这主要是字符集的问题,需要设置连接的数据库的字符集

2.协议错误,无法连接.

修改设置user 表password为old_password('dddd')

3.中文问题

if(mysql_query(&myData, "set names gbk")){
fprintf(stderr, "%d: %sn",
mysql_errno(&myData), mysql_error(&myData));
}

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/197458/viewspace-1032856/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    152
  • 访问量
    724084