微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

centos – mariadb-server安装后没有mysqld或mysql.server

所以…很可能我是个白痴,但我被困住了.我刚刚在Digial Ocean上设置了CentOS 7,我似乎无法运行MariaDB / MySQL服务器.

一些输出

[root@hostname ~]# yum list installed |grep maria
mariadb.x86_64                        1:5.5.37-1.el7_0                @updates  
mariadb-libs.x86_64                   1:5.5.37-1.el7_0                @updates  
mariadb-server.x86_64                 1:5.5.37-1.el7_0                @updates

所以它已安装,我们至少可以看到客户端吗?

[root@hostname ~]# which MysqL
/bin/MysqL

让我们尝试启动服务器,只是为了好玩

[root@hostname ~]# 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.
[root@hostname ~]# MysqLd
-bash: MysqLd: command not found
[root@hostname ~]# MysqL.server start
-bash: MysqL.server: command not found
[root@hostname ~]#

这就是我迷路的地方.查看实际安装的内容,没有服务器/守护程序

[root@hostname ~]# ls -la /bin/my*
-rwxr-xr-x 1 root root 3419136 Jun 24 10:27 /bin/myisamchk
-rwxr-xr-x 1 root root 3290760 Jun 24 10:27 /bin/myisam_ftdump
-rwxr-xr-x 1 root root 3277032 Jun 24 10:27 /bin/myisamlog
-rwxr-xr-x 1 root root 3320200 Jun 24 10:27 /bin/myisampack
-rwxr-xr-x 1 root root 2914904 Jun 24 10:27 /bin/my_print_defaults
-rwxr-xr-x 1 root root 3533016 Jun 24 10:27 /bin/MysqL
-rwxr-xr-x 1 root root  111587 Jun 24 10:24 /bin/MysqLaccess
-rwxr-xr-x 1 root root 3089712 Jun 24 10:27 /bin/MysqLadmin
-rwxr-xr-x 1 root root 3253112 Jun 24 10:27 /bin/MysqLbinlog
lrwxrwxrwx 1 root root      26 Sep  8 03:06 /bin/MysqLbug -> /etc/alternatives/MysqLbug
-rwxr-xr-x 1 root root 3090832 Jun 24 10:27 /bin/MysqLcheck
-rwxr-xr-x 1 root root    4247 Jun 24 10:24 /bin/MysqL_convert_table_format
-rwxr-xr-x 1 root root   24558 Jun 24 10:24 /bin/MysqLd_multi
-rwxr-xr-x 1 root root   27313 Jun 24 10:24 /bin/MysqLd_safe
-rwxr-xr-x 1 root root 3173968 Jun 24 10:27 /bin/MysqLdump
-rwxr-xr-x 1 root root    7913 Jun 24 10:24 /bin/MysqLdumpslow
-rwxr-xr-x 1 root root    3315 Jun 24 10:24 /bin/MysqL_find_rows
-rwxr-xr-x 1 root root    1261 Jun 24 10:24 /bin/MysqL_fix_extensions
-rwxr-xr-x 1 root root   34826 Jun 24 10:24 /bin/MysqLhotcopy
-rwxr-xr-x 1 root root 3082072 Jun 24 10:27 /bin/mysqlimport
-rwxr-xr-x 1 root root   16204 Jun 24 10:24 /bin/MysqL_install_db
-rwxr-xr-x 1 root root 2923136 Jun 24 10:27 /bin/MysqL_plugin
-rwxr-xr-x 1 root root   11578 Jun 24 10:24 /bin/MysqL_secure_installation
-rwxr-xr-x 1 root root   17473 Jun 24 10:24 /bin/MysqL_setpermission
-rwxr-xr-x 1 root root 3084760 Jun 24 10:27 /bin/MysqLshow
-rwxr-xr-x 1 root root 3104240 Jun 24 10:27 /bin/MysqLslap
-rwxr-xr-x 1 root root 3442464 Jun 24 10:27 /bin/MysqLtest
-rwxr-xr-x 1 root root 2918416 Jun 24 10:27 /bin/MysqL_tzinfo_to_sql
-rwxr-xr-x 1 root root 2995400 Jun 24 10:27 /bin/MysqL_upgrade
-rwxr-xr-x 1 root root 2913960 Jun 24 10:27 /bin/MysqL_waitpid
-rwxr-xr-x 1 root root    3888 Jun 24 10:24 /bin/MysqL_zap

有人想指出我在这里做错了什么吗?

如果有人偶然发现这一点,我在这里找到了解决方案: https://ask.fedoraproject.org/en/question/43459/how-to-start-mysql-mysql-isnt-starting/

转贴如下

要在Fedora 20上启动MariaDB,请执行以下命令:

systemctl start mariadb.service

要在Fedora 20上自动启动MariaDB,请执行以下命令:

systemctl enable mariadb.service

启动MariaDB(仅执行一次)后,执行以下命令:

/usr/bin/MysqL_secure_installation

原文地址:https://www.jb51.cc/centos/374075.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。