RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1827261 - [RFE] python3-PyMySQL-0.9.x not available on redhat repositories
Summary: [RFE] python3-PyMySQL-0.9.x not available on redhat repositories
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: python-PyMySQL
Version: 8.1
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: 8.0
Assignee: Michal Schorm
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On: 1885641 1920596
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-23 13:50 UTC by Rajesh Dulhani
Modified: 2021-05-18 16:12 UTC (History)
6 users (show)

Fixed In Version: python-PyMySQL-0.10.1-2.module+el8.4.0+9657+a4b6a102
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Rebase package(s) to version: python-PyMySQL-0.10.1 Highlights, important fixes, or notable enhancements: - change of the default charset - added support for new authentication mechanisms Note: - The default charset change was reverted in python36 stream (upstream has utf8mb4, we keep latin1) to keep backward-compatibility
Clone Of:
Environment:
Last Closed: 2021-05-18 16:12:12 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rajesh Dulhani 2020-04-23 13:50:37 UTC
Description of problem:

We are using this rpm to connect to MySQL with some scripts and we can't connect to MySQL without the latest version of this package.

We can't use tools (scripts python) on RedHat 8 and MySQL 8

Version-Release number of selected component (if applicable):

python3-PyMySQL-0.9.x ( not available )

How reproducible:

On RedHat 8.x (tested on 8.0 & 8.1) with MySQL 8.0.x
Of course, the redhat repositories are needed (enabled)

Steps to Reproduce:


    1. sudo yum update

    2. sudo dnf install @mysql:8.0

    3. sudo systemctl enable --now mysqld

    4. mysql_secure_installation

        No

        1234

        1234

        y

        n

        y

        y



   5. mysql -uroot -p1234

   6.  create user 'toto'@'localhost' identified with caching_sha2_password by '1234';

   7. exit

   8. sudo dnf install python3-PyMySQL

   9. echo "import pymysql
    conn = pymysql.connect(unix_socket='/var/lib/mysql/mysql.sock',user='toto', password='1234', connect_timeout=10, autocommit=True)
    print('connection successful')" > connect_mysql.py

   10. python3 connect_mysql.py



Actual results:

Traceback (most recent call last):
  File "connect_mysql.py", line 3, in <module>
    conn = pymysql.connect(unix_socket="/var/lib/mysql/mysql.sock",user="toto", password="1234", connect_timeout=10, autocommit=True)
  File "/usr/lib/python3.6/site-packages/pymysql/init.py", line 90, in Connect
    return Connection(args, *kwargs)
  File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 699, in init
    self.connect()
  File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 936, in connect
    self._request_authentication()
  File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1165, in _request_authentication
    auth_packet = self._process_auth(plugin_name, auth_packet)
  File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1227, in _process_auth
    raise err.OperationalError(2059, "Authentication plugin '%s' not configured" % plugin_name)
pymysql.err.OperationalError: (2059, "Authentication plugin 'b'caching_sha2_password'' not configured")



Expected results:


connection successful

Additional info:
With unsecure authentication, it works:


   1.mysql -uroot -p1234

    2. create user 'titi'@'localhost' identified with mysql_native_password by '1234';

    3. exit

    4. sed -i -e 's/toto/titi/g' connect_mysql.py

    5. python3 connect_mysql.py


When we update the package PyMySQL with pip: 


   1.  pip3 list | grep PyMySQL
     It should be (0.8.0)


   2. pip3 install -U PyMySQL==0.9.0 --user


   3. pip3 list | grep PyMySQL
     It should be (0.9.0)


   4.  python3 connect_mysql.py
     It works with the old insecure authentication plugin


   5. sed -i -e 's/titi/toto/g' connect_mysql.py


   6. python3 connect_mysql.py
     It works with the new secure authentication plugin :
     caching sha2: Trying fast path
     caching sha2: Trying full auth...
     caching sha2: Sending plain password via secure connection
     connection successful

     It's clear: an update of the official rpm is needed by RedHat 8 Linux to work securely with MySQL 8.0



5] Business justification/requirement to add the feature.

We have PCI DSS environments that require high security. Some security audit happen regularly and this authentication plugin (caching_sha2_password) is required to pass the audit.
So, we can't deploy MySQL 8 on RedHat 8.

Comment 2 Honza Horak 2020-05-12 09:35:13 UTC
Rajesh, with RHEL-8.2 released, there is also python38 module available for customers. This module includes a newer version of PyMySQL, concretely 0.9.3 now. Would it be possible to work with the customer and user the newer python 3.8 instead?

It means basically this:

  $> sudo yum install python38-PyMySQL

If not, please, specify what keeps the customer on Python 3.6, so we understand more the use case.

Comment 14 Michal Schorm 2020-10-07 13:33:03 UTC
Hello,

we made a plan to rebase the PyMySQL in both "python36" and "python38" module streams.
That will fulfill your request.

For more info about the rebase, check the linked BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1885641

Comment 25 errata-xmlrpc 2021-05-18 16:12:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (python36:3.6 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1930


Note You need to log in before you can comment on or make changes to this bug.