Install MySQL 5.6 on CentOS 8

I couldn’t get the various instructions using the MySQL community repo to work, so if you’re in the same boat try this:

Get the 5.6 bundle from mysql.com:

wget https://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-5.6.50-1.el7.x86_64.rpm-bundle.tar

Install some requirements:

dnf -y install libaio ncurses-compat-libs

Unpack and install MySQL:

tar -xvf MySQL-5.6.50-1.el7.x86_64.rpm-bundle.tar
rpm -Uhv MySQL-server-5.6.50-1.el7.x86_64.rpm MySQL-client-5.6.50-1.el7.x86_64.rpm

Then start it off:

systemctl start mysql
systemctl enable mysql