Welcome to TDBSoverflow, Our class's own StackOverflow. Our rules:
  1. Use only meaningful and self-explanatory titles
  2. Tag your questions with meaningful keywords
  3. Use upvotes and downvotes to rate the answers
  4. When you receive a satisfying answer - Click the "V" button
Remember: you may get up to 5 bonus points to your final grade!

Connecting University DB using mysql.connector

+1 vote
31 views

Hi,

It appears we can't use mysql.connector module, since it does not support the "mysql_old_password" format, where as our University's server does (full error below).

Is there a way to remedy this situation without downgrading our code to use an older connection module?

Thanks,

Matan.

>>> cnx = mysql.connector.connect(user=MYSQL_USER, database=MYSQL_DB_NAME, password=MYSQL_PASSWORD, host=MYSQL_HOST)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/__init__.py", line 179, in connect
    return MySQLConnection(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 95, in __init__
    self.connect(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/abstracts.py", line 728, in connect
    self._open_connection()
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 239, in _open_connection
    self._ssl)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 160, in _do_auth
    self._auth_switch_request(username, password)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 185, in _auth_switch_request
    auth = get_auth_plugin(new_auth_plugin)(
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/authentication.py", line 266, in get_auth_plugin
    "Authentication plugin '{0}' is not supported".format(plugin_name))
mysql.connector.errors.NotSupportedError: Authentication plugin 'mysql_old_password' is not supported

asked Jan 13, 2018 by matan (480 points)
can you post the import statement you use to load the mysql library?

Please log in or register to answer this question.

...