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

Tagged , , , , . Bookmark the permalink.

3 Responses to Install MySQL 5.6 on CentOS 8

  1. Abdul Samms says:

    Please also tell us how to remove mysql

  2. Cesar Peralta says:

    Great tutorial. Thank you so much

  3. JJ says:

    I had tried these commands on Rocky 8 (after first removing ALL files pertaining to mysql). I then got an error when trying to start the service, so I ran journalctl -xe which gave me the following error:

    mysql[3777]: Logging to ‘/var/log/mysql/mysqld.log’.
    mysql[3761]: ERROR! The server quit without updating PID file (/var/run/mysqld/mysqld.pid).

    I realized the /var/run/mysqld directory did not exist so I created it and chown’d it with the user/group of mysql:mysql. This then allowed me to start the service on Rocky 8 successfully.

Leave a Reply

Your email address will not be published. Required fields are marked *