• 故障现象,

    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. robotframework RF使用中需要安装的工具和库

    确保 Python 3.6.2 安装成功 安装 如下 RF使用中需要的工具和库 1. RF 在两个Python中安装 robotframework执行命令 pip install robotframe ...

  2. CDI feature

    CDI Java EE的上下文和依赖注入(Contexts and Dependency Injection for Java EE,CDI),CDI是即将完成的Java EE 6平台的关键组成部分, ...

  3. VUE-007-通过路由 router.push 传递 query 参数(路由 name 识别,请求链接显示参数传递)

    在前端页面表单列表修改时,经常需要在页面切换的时候,传递需要修改的表单内容,通常可通过路由进行表单参数的传递. 首先,配置页面跳转路由.在 router/index.js 中配置相应的页面跳转路由,如 ...

  4. node js 爬虫爬取静态页面,

    先打一个简单的通用框子 //根据爬取网页的协议 引入对应的协议, http||https var http = require('https'); //引入cheerio 简单点讲就是node中的jq ...

  5. group by 用法解析

    group by 用法解析 group by语法可以根据给定数据列的每个成员对查询结果进行分组统计,最终得到一个分组汇总表. SELECT子句中的列名必须为分组列或列函数.列函数对于GROUP BY子 ...

  6. Freeswitch配置之sofia

    SIP模块 - mod_sofia SIP 模块是 FreeSWITCH的主要模块. 在 FreeSWITCH中,实现一些互联协议接口的模块称为 Endpoint.FreeSWITH支持很多的 End ...

  7. 出现error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    查看自己python的版本,然后下载自己版本Python的devel,比如python3.6.8就是 sudo apt-get install python3.6-dev

  8. 3、配置XShell上传文件

    1.yum   -y  install  lrzsz(安装 lrzsz) 2.rz -y(会弹出选择文件框,选择上传文件)

  9. 2019.04.26 mongaodb

    打开服务  mongod.exe --dbpath E:\Develop\mongodb_64\data\db 在安装和打开服务之前要建一个db  文件的存储位置 然后打开服务 打开服务之后  打开图 ...

  10. Fiddler使用总结(转载)

    原文地址:https://www.cnblogs.com/yyhh/p/5140852.html 序章 Fiddler是一个蛮好用的抓包工具,可以将网络传输发送与接受的数据包进行截获.重发.编辑.转存 ...