CentOS7 mysqlserver下载错误

CentOS7 mysqlserver下载错误
[root@localhost bin]# rpm -qa httpd
httpd-2.4.6-31.el7.centos.x86_64
[root@localhost bin]# rpm -qa php
php-5.4.16-36.el7_1.x86_64
[root@localhost bin]# rpm -qa mysql
[root@localhost bin]#

我是 Linux 新手,我试图安装 httpd、php 和 mysql。但是在安装 mysql 时出现错误消息。

> [root@localhost bin]# yum install mysql mysql-server Loaded plugins:
> fastestmirror, langpacks Loading mirror speeds from cached hostfile  *
> base: mirror.oasis.onnetcorp.com  * extras: mirror.oasis.onnetcorp.com
> * updates: mirror.oasis.onnetcorp.com Package 1:mariadb-5.5.44-1.el7_1.x86_64 already installed and latest version
> No package mysql-server available. Nothing to do

我也尝试按照下面方法操作。

>  [root@localhost bin]# yum install mariadb-server mariadb-libs mariadb
> Loaded plugins: fastestmirror, langpacks Loading mirror speeds from
> cached hostfile  * base: mirror.oasis.onnetcorp.com  * extras:
> mirror.oasis.onnetcorp.com  * updates: mirror.oasis.onnetcorp.com
> 
> Package 1:mariadb-server-5.5.44-1.el7_1.x86_64 already installed and
> latest version Package 1:mariadb-libs-5.5.44-1.el7_1.x86_64 already
> installed and latest version Package 1:mariadb-5.5.44-1.el7_1.x86_64
> already installed and latest version Nothing to do

我无法安装 mysql 服务器。它似乎在我第一次安装时就被安装了,所以我执行了命令“service mysqld start”

[root@localhost bin]# service mysqld start                                      Redirecting to /bin/systemctl start  mysqld.service
Failed to issue method call: Unit mysqld.service failed to load: No such file or directory.

但发生了同样的事情。请帮我解决~~~谢谢

答案1

它已经安装,这就是 yum 告诉你的。
你应该用 来启动它systemctl start mariadb,服务现在已被弃用

相关内容