How to enable systemd on Amazon Linux AMI

Amazon Linux v 2.0 does support systemd and comes installed by default: cat /etc/os-release NAME=”Amazon Linux” VERSION=”2.0 (2017.12)” ID=”amzn” ID_LIKE=”centos rhel fedora” VERSION_ID=”2.0″ PRETTY_NAME=”Amazon Linux 2.0 (2017.12) LTS Release Candidate” ANSI_COLOR=”0;33″ CPE_NAME=”cpe:2.3:o:amazon:amazon_linux:2.0″ HOME_URL=”https://amazonlinux.com/” rpm -qa | grep -i systemd systemd-libs-219-42.amzn2.4.x86_64 systemd-219-42.amzn2.4.x86_64 systemd-sysv-219-42.amzn2.4.x86_64`

Slave replication stops with Last_SQL_Errno: 1032

You can locate the sql clause code like /usr/bin/mysqlbinlog -v –start-position=142743807 –stop-position=147399325 /data/mysql/data/master-bin.000010 > temp.log Then compare slave and master database difference according to temp.log on specific pos. Then update slave database. Then skip that line with mysql -e “stop slave; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; start slave;”;

Amazon Linux: “apt-get: command not found”

If you’re using Amazon Linux it’s CentOS-based, which is RedHat-based. RH-based installs use yum not apt-get. Something like yum search httpd should show you the available Apache packages – you likely want yum install httpd24. Note: Amazon Linux 2 has diverged from CentOS since the writing of this answer, but still uses yum.

amazon linux 2 ami – aws – How to install mysql in Amazon Linux 2?

I got the answer myself. Follow the below steps: sudo wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm sudo yum localinstall mysql57-community-release-el7-11.noarch.rpm sudo yum install mysql-community-server systemctl start mysqld.service The key is to add the source repo and then install since Amazon Linux 2 doesn’t have the default repos in place already.