简体   繁体   English

在64位系统中通过odbc连接到mysql

[英]Connecting to mysql via odbc in a 64 bit system

I have installed the community server on my computer but for some reason i keep on getting this error 我已经在计算机上安装了社区服务器,但是由于某些原因,我继续收到此错误

Driver={MySQL ODBC 5.3 ANSI Driver};Server=localhost;Database=smsserver;
User=root;Password=123456;Option=3;

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

This is my connection string 这是我的连接字符串

Driver={MySQL ODBC 5.3 ANSI Driver};Server=localhost;Database=smsserver; User=root;Password=123456;Option=3;

I have not done anything really,i just installed the community edition and tried to connect. 我真的没有做任何事情,我只是安装了社区版并尝试进行连接。

This should work: 这应该工作:

Provider=MSDASQL;Driver={MySQL ODBC 5.2 ANSI Driver};Server=localhost;
Database=myDataBase;User=myUsername;Password=myPassword;Option=3;

Data origin 资料来源

I solved the problem by downloading the 32 bit odbc connector and installing and doing the same for he 64 bit. 我通过下载32位odbc连接器并为64位安装并执行相同操作来解决了该问题。

I then used my original string and worked.The answer also given above 然后我使用了原始的字符串并进行了工作。上面也给出了答案

Provider=MSDASQL;Driver={MySQL ODBC 5.2 ANSI Driver};Server=localhost; Database=myDataBase;User=myUsername;Password=myPassword;Option=3;

also worked. 也有效。

in many cases, installing the redists ( vcredist_x64 ) or ( vcredist_x86 ) solves this issue. 在许多情况下,安装redist( vcredist_x64 )或( vcredist_x86 )可解决此问题。

i am wondering why it is not mentioned any where on the website? 我想知道为什么网站上没有提到它?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM