1

Im using AWS Linux 2 AMI Currently I have AWS EC2

Recently the mysql doesn't work anymore but it worked before.

when I tried to do this

sudo service mysql start

or

sudo service mysqld start

It says service mysql unit not found

I tried also to sudo service httpd start and start the mysql but still doesn't work

I tried also to check the disk usage of my ec2

using this commnad : df

This gives me an output like this

Filesystem     1K-blocks    Used Available Use% Mounted on
devtmpfs         2000788       0   2000788   0% /dev
tmpfs            2018800       0   2018800   0% /dev/shm
tmpfs            2018800     480   2018320   1% /run
tmpfs            2018800       0   2018800   0% /sys/fs/cgroup
/dev/xvda1       8376300 5880760   2495540  71% /
tmpfs             403764       0    403764   0% /run/user/1000

Where here /dev/xvdal has 71% of used storage

Is this even related why mysql doesn't want to start?

Pablo
  • 255
  • 1
  • 4
  • 11

1 Answers1

1

I ran an instance with the descriptions, what I found is that a version of mysql-server is not available in the official repositories, probably you installed mariadb-server, what I want you to do is to execute this command:

systemctl list-unit-files | grep mariadb

If you have some match you of course have mariadb instead of mysql installed on your instance so you have to use the next command to start the service:

systemctl start mariadb.service

If you want the service to start when the instance boot you can type the following command:

systemctl enable mariadb.service
allexiusw
  • 181
  • 9