• 故障现象,

    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. stm32f407以太网及USB OTG快速开发

    stm32f407以太网及USB OTG快速开发 引言 想要快速完成网络协议栈和USB OTG功能,使用ST自家的工具STM32CubMx再好不过的了.如果你还不会使用,别着急下面我会一步一步的用图片 ...

  2. afn3.0源码解析---AFURLRequestSerialization

    AFHTTPRequestSerialization: @方法1 - (NSMutableURLRequest *)requestWithMethod:(NSString *)method URLSt ...

  3. 阿里云RDS数据库改造迁移方案

    1. 改造原因 (1) 由于历史原因, 本应该是同一个库的表分布在两个数据库中,需要对这两个库进行合并. (2) 已有的数据库性能无法满足业务的增长需要, 查询卡,慢问题突出. (3) 当前自建Mys ...

  4. xgboost 最优参数, df某一个字段进行字符串搜索

    0.909323  with:   {'max_depth': 6, 'min_child_weight': 0.8, 'n_estimators': 800} df_huoguo = df[df.c ...

  5. 好用的一些 git 命令

    git stash  将已修改未提交的 改动保存起来   恢复用git stash pop gir revert  反转commit git rebase 更换基础分支 git grep  -n 显示 ...

  6. git使用手册整理

    -------------------20181217------------------- git使用:在gitbash 下初始化用户: $ git config --global user.nam ...

  7. mysql执行update语句受影响行数是0

    mybatis连接mysql数据库,发现同一个update执行多次,返回的int值都是1. 我记得同样的update再次执行时 受影响行数是0. 后来发现,我之前一直用的SQLyog是这样子的. 原来 ...

  8. 004-CSS怎样让背景充满整个屏幕

    <!doctype html><html><body> ...Your content goes here...</body></html> ...

  9. 下载caffe慢

    国内在github上下载软件慢,应在gitee下载git clone https://gitee.com/cuibixuan/caffe.git

  10. Spring Boot:简介

    一.概述 Spring Boot 是Java一个开源框架,主要用途是用来创建微服务:可以用来创建独立的.生产的基于Spring的应用程序. Spring Boot 采用默认配置观点,多数Spring ...