Can't connect to local MySQL server through socket'/tmp/mysql.sock'
来源:互联网 发布:战争之王原型 知乎 编辑:程序博客网 时间:2024/06/02 05:04
ERROR 2002 (HY000): Can't connect to local MySQL server through socket'/tmp/mysql.sock'
错误提示:
root@localhost ~]# mysql--socket=/tmp/mysql.sock
ERROR 2002(HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'(2)
解决方法:
由于mysql 默认的mysql.sock 是在/var/lib/mysql/mysql.sock,但linux系统总是去/tmp/mysql.sock查找,所以会报错
[root@localhost ~]# find / -namemysql.sock
/var/lib/mysql/mysql.sock
把/var/lib/mysql/mysql.sock添加到/etc/my.cnf
0 0
- ERROR 2002: Can't connect to local MySQL server through socket '/tmp/tmp/mysql.sock' (2)
- ERROR 2002: Can't connect to local MySQL server through socket '/tmp/tmp/mysql.sock' (2)
- 解决mysql启动问题: Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- mysql连接错误: Can’t connect to local MySQL server through socket /tmp/mysql.sock
- Django +MySQL Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- mysql运行中问题Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- mysql Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- [mysql]Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- Mysql error 2002 (HY000) : Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- mysql error 2002 (HY000) : Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- 记录mysql错误:Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- mysql安装出现can't connect to local mysql server through socket /tmp/mysql.sock
- Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- php error Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- 继续摘抄:Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- BZOJ 3224 普通平衡树 Trie树
- 文章标题
- 字符串后移: 从后往前移!!!
- git设置命令简写
- No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Invers
- Can't connect to local MySQL server through socket'/tmp/mysql.sock'
- 最长对称子串 (25分)
- MyBatis +Spring+TDDL 问答实例
- 剑指Offer 3 二维数组中的查找
- 一、JVM内存区域详解
- Python 内置的object对象(1)
- CDOJ 1402 三角形棋盘上的博弈游戏 状压DP
- 【深度学习基础】机器学习的定义与demo展示
- 解说Win32的窗口子类化