• 故障现象,

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")

    一直 以为是 服务器安装错误, 而且用

    dnf info mariadb , 查看到的包的信息, 发现这个包 确实已经被安装过了.

但是 实际上这个包 仅仅提供的是 一个客户端client 的功能 . 并没有mariadb/mysqld服务器的功能!

可以看到, the base package contains the standard client mysql/mariadb program and generic mysql files , 即mariadb.i686这个包 只是包含客户端 程序, 并没有 服务器端 程序. 用 dnf seach mariadb , 可以看到 更多的结果: mariadb , maridb-server, mariadb-common, mariadb-config 等等相关的包. 所以 要安装 mariadb-server 这个包!

  • 在没有安装mariadb-server 这个包的时候, 用 systemctl list-unit-files |grep 'mariadb' 会 显示没有 这个相关的 unit单元.(所谓 unit 单元 , 就是 指 systemd 管理的系统服务和设备等, 包括 系统服务service, target, 设备device等等.

  • 当安装好 maridb-server包后, 就能查到对应的 mariadb.service了 当然, 也可以安装其他相关的 辅助包,比如 mariadb-common, mariadb-config等.

[lee@localhost ~]$ systemctl list-unit-files | grep 'mysqld'
[lee@localhost ~]$ systemctl list-unit-files | grep 'mariadb'
mariadb.service disabled
[lee@localhost ~]$

总之, 就是, 数据库服务器 是 mariadb.service ( 由mariadb-server包提供 ) , 访问服务器的客户端程序是mysql, (由mariadb包提供).

没有 /var/log/messages文件?

sticky位?http://www.cnblogs.com/fnng/archive/2012/05/06/2485973.html

cups服务https://code.evink.me/2017/12/post/how-to-disable-ubuntu-cupsd-server/

http://www.cnblogs.com/leaven/archive/2010/10/20/1856482.html

http://xshell.net/linux/cupsd_631.html

如何安装mariadb服务器和解决 can't connect to local mysql server through socket...的更多相关文章

  1. 解决: Can’t connect to local MySQL server through socket /var/lib/mysql/mysql.sock

    今天在搬瓦工上使用mysql 命令行,总报一个这样的错:Can't connect to local MySQL server through socket '/xxxxx/mysql.sock',一 ...

  2. 亲测有效,解决Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) ";

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/hjf161105/article/details/78850658 最近租了一个阿里云云翼服务器,趁 ...

  3. 服务器数据库挂掉 Can 't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock '(2) ";

    刚刚遇到这个报错,我无语了,我这么个菜逼,咋解决,还好师兄(付付)解决了,付付真棒,在此记录一下,以供学习 Can 't connect to local MySQL server through s ...

  4. 命令行连接mysql服务器时 报Can't connect to local MySQL server through socket 'xxx.sock'错误

    本来之前用的好好的mysql服务器,突然就报Can't connect to local MySQL server through socket 'xxx.sock'错误了 遇到该问题思路首先是:检查 ...

  5. 解决Can't connect to local MySQL server through socket '/tmp/mysql.sock'

    0 Problem 电脑重启后用python的MySQLdb连接数据库报错 Can't connect to local MySQL server through socket '/tmp/mysql ...

  6. 解决Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) ";

    解决方案: https://blog.csdn.net/HeatDeath/article/details/79065872 https://blog.csdn.net/hjf161105/artic ...

  7. mac 安装mysql 报错“ERROR 2002 (HY000): Can not connect to local MySQL server through socket '/tmp/mysql.sock' (2)” 解决办法

    首先安装 homebrew 再 brew install mysql 之后连接 mysql 无论是登录还是修改初始密码都会报如下的错误 ERROR 2002 (HY000): Can not conn ...

  8. MYSQL错误解决:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ( ...

  9. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 的解决办法

    更换mysql数据目录后出现ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql ...

随机推荐

  1. Homework 7 INF 552

    Homework 7 INF 552,1. Generative Models for Text(a) In this problem, we are trying to build a genera ...

  2. jar包通过exe4j打包成exe可执行文件

    https://blog.csdn.net/jia611/article/details/42060945 参照此文即可,注意,我的是maven打包成的jar,选择maincalss时,需要选择jar ...

  3. 骑士(树形dp)

    题意:给你一个基环树森林,每个点有一个权值,一条边上的两个节点不能同时选择.选取任意个节点,求最大权值和 对于每颗基环树:找环→断边→树形dp(没有上司的舞会) #include<iostrea ...

  4. 【论文阅读】Deep Mixture of Diverse Experts for Large-Scale Visual Recognition

    导读: 本文为论文<Deep Mixture of Diverse Experts for Large-Scale Visual Recognition>的阅读总结.目的是做大规模图像分类 ...

  5. FB面经Prepare: Bipartite a graph

    input friends relations{{1,2}, {2,3}, {3,4}} 把人分成两拨,每拨人互相不认识, 所以应该是group1{1,3}, group2{2,4} 这道题应该是ho ...

  6. Go 初体验 - 错误与异常处理 - recover和panic

    先看代码: 输出: 内建函数panic可以让我们人为地产生一个运行时恐慌.不过,这种致命错误是可以被恢复的.在Go语言中,内建函数recover就可以做到这一点. 实际上,内建函数panic和reco ...

  7. SSIS Hekaton In-Memory OLTP 【翻译一篇外国文章】

    来自:http://www.itprotoday.com/microsoft-sql-server/important-new-features-sql-server-2014 Microsoft's ...

  8. git之reset图解

    https://blog.csdn.net/longintchar/article/details/81843048 1.三棵树. 此时如果我们运行 git status,会发现没有任何改动,因为现在 ...

  9. vue中样式的典型操作(:class,:style)

    <template> <div class="home-wrapper"> <div class="home-top">th ...

  10. Windows 10 关闭Hyper-V

    以管理员身份运行命令提示符 关闭 bcdedit /set hypervisorlaunchtype off 启用 bcdedit / set hypervisorlaunchtype auto 禁用 ...