Menu

_mysql_exceptions.OperationalError: (1251, 'C

Help
AJ Coon
2005-09-27
2012-09-19
  • AJ Coon

    AJ Coon - 2005-09-27

    Hello,

    I'm running into an issue when trying to connect to MySQL from my python script. Here's the error I get:

    _mysql_exceptions.OperationalError: (1251, 'Client does not support authentication protocol requested by server; consider upgrading MySQL client')

    Doing some research (Google is our friend) took me here:

    http://www.devshed.com/c/a/MySQL/Troubleshooting-Problems-with-MySQL-Programs/2/

    I'm not sure that I need to use one of these workarounds, as according to your notes, MySQLdb-1.1.x should work with the versions of MySQL and python that I have installed. Can you please help me avoid a workaround?

    I'm running Ubuntu:

    Ubuntu 5.04 "Hoary Hedgehog"

    I have the following packages installed:

    root@localhost:/etc/openvpn # dpkg -l python2.4-mysqldb python2.4
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
    |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
    ||/ Name Version Description
    +++-=================================-=================================-==================================================================================
    ii python2.4-mysqldb 1.1.6-1ubuntu2 A Python interface to MySQL
    ii python2.4 2.4.1-0 An interactive high-level object-oriented language (version 2.4)

    I am running a source-based installation of MySQL 4.1.14.

    Thanks,
    aj

     
    • Andy Dustman

      Andy Dustman - 2005-09-27

      Do this:

      >>> import MySQLdb
      >>> print MySQLdb.get_client_info()

      The output, according to what you say you have, should be 4.1.14. However, since you are using a binary pacage of MySQLdb (and an old one at that), I expect it will give a 4.0 or 3.23 version.

      Solution: Get the MySQL-python-1.2.1c3 tarball and build it yourself.

       
    • AJ Coon

      AJ Coon - 2005-09-27

      Crazy...I'll have to email the package maintainer too. Thanks.

      aj@localhost:~/public_html$ python
      Python 2.4.1 (#2, Mar 30 2005, 21:51:10)
      [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import MySQLdb
      >>> print MySQLdb.get_client_info()
      3.23.56

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.