大网数据广告活动
服务器运维问答

MYSQL Start unit not found

· 52CE 我爱测

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 …

问题原文

原帖链接 · Pablo · CC BY-SA 4.0

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?

已采纳解答

原帖链接 · allexiusw · CC BY-SA 4.0

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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-05-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。