root@PC-RENGUOQIANG:/usr/sbin# /etc/init.d/mysql start
* Starting MySQL database server mysqld [ OK ]
root@PC-RENGUOQIANG:/usr/sbin# ps -ef | grep mysql
mysql : ? :: /bin/sh /usr/bin/mysqld_safe
mysql : ? :: /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port= --log-syslog= --log-syslog-facility=daemon --log-syslog-tag=
root : tty1 :: grep --color=auto mysq

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - 国内版 Bing
https://cn.bing.com/search?FORM=U227DF&PC=U227&q=ERROR+2002+(HY000)%3A+Can%27t+connect+to+local+MySQL+server+through+socket+%27%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock%27+(2)

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - 乐于改变 - CSDN博客
https://blog.csdn.net/lmss82/article/details/4414178

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) - LaMw - 博客园
https://www.cnblogs.com/Lam7/p/6090975.html

MYSQL错误解决:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)-云栖社区-阿里云
https://yq.aliyun.com/articles/44934

phpmyadmin - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - Stack Overflow
https://stackoverflow.com/questions/11657829/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run

Can’t connect to local MySQL server through socket_数据库技术_Linux公社-Linux系统门户网站
https://www.linuxidc.com/Linux/2018-05/152246.htm

文件相关路径:

MySQL
https://help.ubuntu.com/lts/serverguide/mysql.html

Ubuntu中MySQL5.7设置utf8编码格式步骤 - 为了、梦想 的博客 - CSDN博客
https://blog.csdn.net/qq_32144341/article/details/51318390

ubuntu彻底删除mysql,并重装 - weixin_41918841的博客 - CSDN博客
https://blog.csdn.net/weixin_41918841/article/details/82993537

root@PC-RENGUOQIANG:~# cat /etc/mysql/my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html #
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
# !includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/ root@PC-RENGUOQIANG:~# cat /etc/mysql/mysql.conf.d/mysqld.cnf

Running MYSQL 5.7 By Bash On Ubuntu On Windows:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)的更多相关文章

  1. ubuntu 下安装 mysql 启动报错:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

    环境: ubuntu LTS 18.04.1 mysql Ver 14.14 Distrib 5.7.29, for Linux (x86_64) 初探 linux,按照如下安装完mysql sudo ...

  2. mysql连接数据库存报下面错误:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

    输入 mysql -u root 登录 mysql 的时候出现以下错误: ERROR 2002 (HY000): Can't connect to local MySQL server through ...

  3. 连接数据库报错: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.soc ...

  4. 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' ( ...

  5. 【Problem】xampp in ubuntu下命令行启动mysql报错: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)

    xampp in ubuntu下命令行启动mysql报错: reddevil@reddevil-Lenovo:/opt/lampp$ ./bin/mysql -u root -p Enter pass ...

  6. mysql启动不了:ERROR 2002 (HY000): Can’t connect to local MySQL server through socket

    ps aux |grep mysql kill所有列出的进程,然后重启 service mysql start 原因有可能是mysqld没启动:service mysqld start. 持续出现此问 ...

  7. 解决Mysql错误:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

    需要重启服务器:sudo /etc/init.d/mysql restart

  8. mariadb报:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111 "Connection refused")

    我这边移除了mysql.sock文件后,重启服务就成功了. 还有一种情况,就是加入galera后,可能是server.cnf配置信息出了问题导致的,修改后,重新运行galera即可,数据库就可以启动成 ...

  9. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'解决

    用XAMPP装装好mysql之后,mysql -uroot 连不上,报这个错误:   ERROR 2002 (HY000): Can't connect to local MySQL server t ...

随机推荐

  1. 用Nodejs遍历云存储文件

    起因 最近想要将云存储中的文件去重.因为有现成的Nodejs的API,所以打算用Nodejs实现此功能. 伪代码如下: scanDir = function(uri){ return new Prom ...

  2. python统计两个字符串从首字符开始最大连续相同的字符数

    在python中统计两个字符串从首字符开始最大连续相同的字符数,函数如下: def get_num(s1, s2): num = 0 len_s1 = len(s1) list_s1 = [] for ...

  3. python调用C语言接口

    python调用C语言接口 注:本文所有示例介绍基于linux平台 在底层开发中,一般是使用C或者C++,但是有时候为了开发效率或者在写测试脚本的时候,会经常使用到python,所以这就涉及到一个问题 ...

  4. 【解决】k8s 1.15.2 镜像下载方案

    k8s 国内镜像下载方案 众所周知,国内是不太容易下载k8s.gcr.io站点的镜像的 一.第一种方案:Azure中国镜像站 http://mirror.azure.cn/help/gcr-proxy ...

  5. php一句话木马+中国菜刀拿服务器文件目录

    使用工具: 中国菜刀 一句话php木马 <?php @eval($_POST['123456']);?> 第一步,将php木马上传至服务器,为了方便我就直接在服务器上建立. [root@p ...

  6. Discuz通过修改文章标题更好的实现SEO的方法

    找到: /source/module/forum/forum_viewthread.php 代码如下: $navtitle = get_title_page($_G['forum_thread'][' ...

  7. cmds挖掘redolog

      select member from v$logfile;   exec dbms_logmnr.add_logfile(logfilename=>'+CMDSDG/cmds/onlinel ...

  8. 20182310 第二周&第三周学习总结

    20182310 2019-2020-1 <数据结构与面向对象程序设计>第2周&第3周学习总结 教材学习内容总结 1.首先是String类定义的字符串,然后是print和print ...

  9. SSM项目day4 Oracle批量插入数据bug <foreach>标签中collection属性使用的是属性名

  10. [Inside HotSpot] Serial垃圾回收器 (一) Full GC

    Serial垃圾回收器Full GC Serial垃圾回收器的Full GC使用标记-压缩(Mark-Compact)进行垃圾回收,该算法基于Donald E. Knuth提出的Lisp2算法,它会把 ...