• 故障现象,

    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. vue 父组件给子组件传值,子组件给父组件传值

    父组件如何给子组件传值 使用props 举个例子: 子组件:fromTest.vue,父组件 app.vue fromTest.vue <template> <h2>{{tit ...

  2. MSSQL2008 数据库展开报错:值不能为空。 参数名: viewInfo (Microsoft.SqlServer.Management.SqlStudio.Explorer)

    今天打开数据库,结果出现:值不能为空. 参数名: viewInfo (Microsoft.SqlServer.Management.SqlStudio.Explorer) 百度之后找到其中一种解决方案 ...

  3. 2019年春季学期第四周作业Compile Summarize

    这个作业属于哪个课程 C语言程序设计一 这个作业要求在哪里 2019春季学期第四周作业 我的课程目标 重新学习有关数组的问题 这个作业在哪个具体方面帮助我实现目标 对于置换有了新的见解 参考文献 中国 ...

  4. [svc]简单理解什么是rpc调用?跟restapi有何区别?

    什么是rpc调用 restapi调用方式是对数据的crud. 常见的我们写flash写个api,或者借助django drf写个标准的resetapi,一个url可以借助httpget post pu ...

  5. [js]展开运算符

    function f(...args){ console.log(args); } f(1,2,3,4,5) [...args] = [1,2,3,4] function f(...args){ co ...

  6. Modelsimobjects空白无显示问题和ISim仿真时出现空白

    困扰朕长达一周的问题得以解决!!!!! 发生这种情况的根源是win10自带的防火墙的问题.只有关闭防火墙,再重新打开软件进行仿真就能出现正常的仿真界面. 关闭防火墙的方法为:控制面板>>系 ...

  7. 白话skynet第一篇

    当你走过一个坐在自己店门前的杂货商面前.走过一个吸着烟斗的守门人面前,走过一个马车夫面前时,请你给我描绘一下这个杂货商.守门人和马车夫,他们的姿态,他们的外貌,要用画家那样的细节描绘出他们的精神本质, ...

  8. linux中巧用ctrl-z后台运行程序

    我们知道后台运行任务时,可以用 () 和 &,但是有的时候我们会忘记加&,对于执行需要很长时间的任务来说,Ctrl+Z可能是一个比较好的把任务转入后台的方法. 当我们按下Ctrl+Z时 ...

  9. php----------php安装xhprof扩展和简单使用

    1.下载源码包 https://github.com/longxinH/xhprof  (wget https://github.com/longxinH/xhprof/archive/master. ...

  10. linux----------fedora 27 如何启用输入法

    1.安装完成以后是自带了输入法的,但是需要启用. 一定要放到第一个位置,然后注销或者重启.