开发者社区 问答 正文

c语言mysql pipe访问的问题

现在想用管道的方式去访问mysql(mysql用的版本是5.5.16),在win的平台上,配置文件中是这样设置的,
[mysqld]
`# The next three options are mutually exclusive to SERVER_PORT below.
skip-networking
enable-named-pipe`
`# The Pipe the MySQL Server will use
socket=mysql`
这部分是关于mysqld的部分。
用的是c语言,连接用的是
mysql_real_connect(conn_, ".", username, password, dbname, port, "mysql", CLIENT_FOUND_ROWS | CLIENT_MULTI_RESULTS)。
连接不上,报错误:
Lost connection to MySQL server at 'waiting for initial communication packet', system error: 0。
我用mysql ce连接(用的是管道的方式),是可以连接的上去,请问,什么原因?

展开
收起
落地花开啦 2016-02-08 11:28:22 2894 分享 版权
0 条回答
写回答
取消 提交回答