Cannot start mysql-server on Amazon Linux 2 due to dependency issues

I'm trying to install MySQL on a Amazon Linux 2 server and I can't seem to get past this dependency issue (prevents server pkgs etc being installed thus preventing me from starting a mysql-server.

Commands I ran are below:

sudo wget https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
sudo rpm -Uvh mysql80-community-release-el8-1.noarch.rpm
sudo yum install mysql-server
sudo yum provides */libmysqlclient.so.18
sudo yum install mariadb-libs-5.5.68-1.amzn2.x86_64
sudo systemctl status mysqld
sudo systemctl start mysqld

The following errors I receive when attempting sudo yum install mysql-server and sudo status mysql-server:

sudo yum install mysql-server

sudo systemctl status mysql-server

No clue how to proceed from here, haven't been able to find any helpful resources online, would be very grateful if someone here could help me install and get the MySQL server up and running, as this is something I'm struggling with for work.

Kindest regards.


Amazon Linux may have been based on Centos in the past, but it's a standalone distro. Don't treat it like Centos or things will go badly. My experience over the years with AL / AL2 is that it's much more difficult to install software and get support, so I don't use it any more except for the simplest use cases. I prefer Ubuntu, the software available and support are MUCH better.

If your server is new and easily replaced I'd discard it and create a new one before going forward. If not you need to roll back the changes you made above before trying again.

If you must use AL2, Amazon has a tutorial for installing MariaDB here. It doesn't use external repos so if that will work for you give it a go.

Otherwise follow an AL2 / MySQL8 tutorial rather than a Centos tutorial. I've found a couple on Google here and here, but I can't vouch for either.