I have Python 2.7, MySQL 5.5, MySQL ODBC Connector 5.1 and pyodbc installed on my computer that is running Windows 7, 64-bit ...
The only problem is that everything is set as 64-bit, with the exception of pyodbc, which is 32-bit.
When using easy_install to download pyodbc, it automatically downloads the 32-bit version. Thus, when I try to connect to my database using:
cnxn = pyodbc.connect('DRIVER={MySQL ODBC 5.1 DRIVER};SERVER=localhost;DATABASE=test;UID=root;PWD=password')
I get an error message:
Data source name not found and no default driver specified (0) (SQLDriverConnect)
And when I try to specify a DSN using
cnxn = pyodbc.connect('DSN=dsn_name;etc...')
I get an error message:
The specified DSN contains an architecture mismatch between the Driver and Application (0) (SQLDriverConnect)
This link tells me that this is due to a 32/64-bit mismatch, as expected: http://msdn.microsoft.com/en-us/library/windows/desktop/ms712362(v=vs.85).aspx
I have two questions:
1) Is it possible to force download easy_install 64-bit pyobbc, or can I download 64-bit pyodbc manually?
2) If the above is not possible, is it possible to configure a DSN for this using the Microsoft ODBC Data Source Administrator window.
Thanks.
aensm source share