I am trying to install MySql 5.7 community server on Centos 8 but I can't figure out a way to configure any repo that works.

yum repolist all | grep mysql
CentOS-8 - AppStream                            2.2 kB/s | 4.3 kB     00:02    
CentOS-8 - Base                                 2.3 kB/s | 3.9 kB     00:01    
CentOS-8 - Extras                               2.1 kB/s | 1.5 kB     00:00    
CentOS-8 - PowerTools                           7.8 kB/s | 4.3 kB     00:00    

and installing with yum / dnf both gimme the same result

sudo dnf install @mysql
Last metadata expiration check: 0:07:30 ago on Tue 03 Dec 2019 02:16:26 AM UTC.
Dependencies resolved.
 Package                                                         Arch                                      Version                                                                 Repository                                    Size
Installing group/module packages:
 mysql-server                                                    x86_64                                    8.0.17-3.module_el8.0.0+181+899d6349                                    AppStream                                     22 M
Installing dependencies:
 mariadb-connector-c-config                                      noarch                                    3.0.7-1.el8                                                             AppStream                                     13 k
 mecab                                                           x86_64                                    0.996-1.module_el8.0.0+41+ca30bab6.9                                    AppStream                                    397 k
 mysql                                                           x86_64                                    8.0.17-3.module_el8.0.0+181+899d6349                                    AppStream                                     11 M
 mysql-common                                                    x86_64                                    8.0.17-3.module_el8.0.0+181+899d6349                                    AppStream                                    143 k
 mysql-errmsg                                                    x86_64                                    8.0.17-3.module_el8.0.0+181+899d6349                                    AppStream                                    557 k
 protobuf-lite                                                   x86_64                                    3.5.0-7.el8                                                             AppStream                                    150 k
 libaio                                                          x86_64                                    0.3.110-12.el8                                                          BaseOS                                        32 k
 numactl-libs                                                    x86_64                                    2.0.12-2.el8                                                            BaseOS                                        36 k
 policycoreutils-python-utils                                    noarch                                    2.8-16.1.el8                                                            BaseOS                                       228 k

Is it even possible to install MySql 5.7 on centos 8?

  • Found a direct download here: dev.mysql.com/downloads/mysql/5.7.html – ajgringo619 Dec 3 '19 at 2:58
  • The version that comes in the Centos 8 repos is 8.0. I would advise against using the method in the comment above because those packages are meant for a previous release. Do you just want to use MySQL 5.7 on its own or do you need it for use with something else? – Nasir Riley Dec 3 '19 at 3:17

I followed the instructions found here and was able to install MySQL 5.7 on CentOS 8


[root@mysql01 ~]cat /etc/*release* | grep release
CentOS Linux release 8.0.1905 (Core)

[root@mysql01 ~]# rpm -qi mysql-community-server
Name        : mysql-community-server
Version     : 5.7.29
Release     : 1.el7
Architecture: x86_64
| improve this answer | |
  • Make sure you fully answer the question from the original poster. It seems he was looking more for information on using the appropriate repository rather than simply installing MySQL. – Thomas N Jan 14 at 23:17
  • Using the instructions linked I added the correct repo to intall MySQL 5.7 utilizing YUM – Tony Solano Jan 15 at 1:42
  • Thanks Tony, worked like a charm. – user728650 Jan 15 at 6:51

As mentioned by Tony above, [the accepted answer], here is a step by step guide for how to install mysql 5.7 on centos 8.

Just in case the blog goes down someday, here is the excerpt of all the steps involved

step1: remove mysql default stream

sudo dnf remove @mysql
sudo dnf module reset mysql && sudo dnf module disable mysql

step2: add mysql 5.7 repo




name=MySQL 5.7 Community Server

name=MySQL Connectors Community

name=MySQL Tools Community

step3: install as usual

sudo dnf --enablerepo=mysql57-community install mysql-community-server

rest of the steps (password, and secure installation are same with the 5.7 installation)

sudo systemctl enable --now mysqld.service
#read temp password
grep 'A temporary password' /var/log/mysqld.log |tail -1
#secure it
sudo mysql_secure_installation
| improve this answer | |

Yes I think the question is "is it possible to install mysql5.7 on Centos 8?" I have been trying to figure this out since few days now but it has been either an error in starting mysqld or not installing. Attempt to install through repository using the command failed with error. I had a download of the rpm bundle of mysql5.7, got it installed but starting mysqld failed with error. I have googled the error but not able to fix. I have a feeling that the version is not compatible with Centos8. Installing mysql8.0 was fine on Centos8 with mysqld also starting ok but unfortunately I could not connect the database to the 3rd party software I am working on. Its really a shame that all efforts has proved abortive.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.