MySQL Connector/Python enables Python programs to access MySQL databases, using an API that is compliant with the Python Database API Specification v2.0 (PEP 249). It also contains an implementation of the X DevAPI, an Application Programming Interface for working with the MySQL Document Store.
sudo yum -y install mysql-connector-python
Example:
$ sudo yum install -y mysql-connector-python Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/x86_64/metalink | 25 kB 00:00 * base: asi-fs-w.contabo.net Excluding mirror: mirror.sfo12.us.leaseweb.net * epel: ziply.mm.fcix.net * extras: mirror.fcix.net * remi-php74: ftp.riken.jp * remi-safe: ftp.riken.jp Excluding mirror: mirror.mia11.us.leaseweb.net * updates: asi-fs-w.contabo.net base | 3.6 kB 00:00:00 epel | 4.7 kB 00:00:00 extras | 2.9 kB 00:00:00 mysql-connectors-community | 2.6 kB 00:00:00 mysql-tools-community | 2.6 kB 00:00:00 mysql57-community | 2.6 kB 00:00:00 remi-php74 | 3.0 kB 00:00:00 remi-safe | 3.0 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/3): epel/x86_64/updateinfo | 1.0 MB 00:00:00 (2/3): epel/x86_64/primary_db | 7.0 MB 00:00:00 (3/3): remi-safe/primary_db | 2.3 MB 00:00:02 Resolving Dependencies --> Running transaction check ---> Package mysql-connector-python.x86_64 0:8.0.23-1.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved =============================================================================================================== Package Arch Version Repository Size =============================================================================================================== Installing: mysql-connector-python x86_64 8.0.23-1.el7 mysql-connectors-community 11 M Transaction Summary =============================================================================================================== Install 1 Package Total download size: 11 M Installed size: 51 M Downloading packages: mysql-connector-python-8.0.23-1.el7.x86_64.rpm | 11 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : mysql-connector-python-8.0.23-1.el7.x86_64 1/1 Verifying : mysql-connector-python-8.0.23-1.el7.x86_64 1/1 Installed: mysql-connector-python.x86_64 0:8.0.23-1.el7 Complete!