ERROR 2002 (HY000):mysql 启动常见错误

解决办法:ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (2)

vim  /etc/my.cnf

在最后新加一个段,因为在编译安装的时候,路径写的是sock=/tmp/mysql.sock  ,但是启动时,系统回去默认找var/lib/mysql/mysql.sock, 所以就新加个字段指定实际路径

[mysql]

socket=/tmp/mysql.

时间: 2024-10-12 20:09:29

ERROR 2002 (HY000):mysql 启动常见错误的相关文章

启动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’ (2) 1.先查看 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已经启动.另外看看是不是权限问题. 2.确定你的mysql.sock是不是在那个位置,mysql -u 你的mysql用户名 -p -S /var/lib/mysql/mysql.sock 3

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)--MySQL错误

环境:RHEL5.5 centos的yum源更新 1.启动MySQL出现错误: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 2.解决方法(摘自:http://wenda.haosou.com/q/1364099334067193?src=150) 1.先查看 /etc/rc.d/init.d/mysqld status 看看m y s

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' (2) 据说这个问题的原因很多,当然,我自己这个问题我是清楚的,就是mysql.sock的位置所致,一个是PHP要求的,一个是MYSQLD定义的,一个是MY.CONF指定的...SO.... 暂时不能统一的话,用软链接LN -S命令解决吧.. 方案5 摘要:解决不能通过mysql.sock连接MySQ

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

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var mysql 启动不了 ps -A | grep -i mysql kill 列出来的进程 service mysql start 我的问题就解决了 ---------------------------------------------- Fedora8启动mysql 报错:ERROR 2002 (HY000): Can’t connect

安装mysql后ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var mysql 启动不了

ps -A | grep -i mysql kill 列出来的进程 service mysql start 我的问题就解决了 ---------------------------------------------- Fedora8启动mysql 报错:ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) 1.先查看 /etc/rc.d/ini

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var mysql 启动不了(转载)

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var mysql 启动不了 ps -A | grep -i mysql kill 列出来的进程 service mysql start 我的问题就解决了 ---------------------------------------------- Fedora8启动mysql 报错:ERROR 2002 (HY000): Can't connect

mysql更改数据目录步骤与错误(ERROR 2002 (HY000))处理方法

1,关闭mysql服务: service mysqld stop 2,创建新建的目录 mkdir -p data 3,把以前的目录转移到新的数据目录 mv /var/lib/mysql/ /data/ 4,编辑my.cnf vi /etc/my.cnf 修改其中的datadir和socket到新的路径 [mysqld] datadir=/data/mysql socket=/data/mysql/mysql.sock 5.修改MySQL启动脚本/etc/init.d/mysql 最后,需要修改M

Mac下Mysql启动异常["ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"]

在mac下使用brew安装mysql,之前没有使用过,今天启动的时候发现启动不了 huijundeMacBook-Pro:bin huijunzhang$ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 查看mysql的安装位置: huijundeMacBook-Pro:bin huijunzhang$ which mysql /usr/local

mysql登陆启动报错 ERROR 2002 (HY000) 解决方法

报错信息 登陆数据库报错:` ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")` 重启服务报错:Job for mariadb.service failed because the control process exited with error code. See &quo