New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to connect to the database: Can't open lib 'MySQL ODBC 3.51 Driver' #264

Closed
shravankumar147 opened this Issue Aug 7, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@shravankumar147

shravankumar147 commented Aug 7, 2017

Issue

unable to connect with the database:
Error:
('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'MySQL ODBC 3.51 Driver' : file not found (0) (SQLDriverConnect)")

Environment

  • Python: 2.7
  • pyodbc: latest from pip install
  • OS: ubuntu 16.04 x64
  • DB:MySQL
  • driver:MySQL ODBC 3.51 Driver
@gordthompson

This comment has been minimized.

Contributor

gordthompson commented Aug 7, 2017

Have you actually installed the ODBC driver for MySQL? If so, did you register the driver so that it appears in odbcinst.ini, for example:

[MySQL ODBC 3.51 Driver]
Driver=/home/gord/Downloads/mysql-connector-odbc-3.51.30-linux-glibc2.3-x86-64bit/lib/libmyodbc3.so
UsageCount=1

You should be able to use the odbcinst -j command to check the location of odbcinst.ini. On Ubuntu it is typically /etc/odbcinst.ini.

@shravankumar147

This comment has been minimized.

shravankumar147 commented Mar 4, 2018

Tried and worked Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment