/var/lib/mysql 的访问权限问题 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

mysql 登录不进去 提示Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (2)

shell> chown -R 777/var/lib/mysql

接着启动服务器

shell> /etc/init.d/mysql start

服务器正常启动后察看 /var/lib/mysql 自动生成mysql.sock文件

成功开启进入mysql

/var/lib/mysql 的访问权限问题 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

时间: 2024-10-29 20:08:30

/var/lib/mysql 的访问权限问题 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)的相关文章

解决mysql报错Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

启动mysql 报错: 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错误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

Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’解决方法 + Linux启动/停止/重启Mysql数据库的方法

启动mysql 报错: 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/

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' 解决办法

启动mysql 报错: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (111) 1.先查看 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已经启动.另外看看是不是权限问题. 2.确定你的mysql.sock是不是在那个位置,mysql -u 你的mysql用户名 -p -S /var/lib/mysq

服务器数据库挂掉 Can 't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock '(2) ";

刚刚遇到这个报错,我无语了,我这么个菜逼,咋解决,还好师兄(付付)解决了,付付真棒,在此记录一下,以供学习 Can 't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock '(2) "; 1.查日志(首先还是看error.log),我看了一遍,继续急,师兄看了一遍 2. can't create /write to file 'tmp'  ,fk,就是/tmp的权限问题,害我干着急 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

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.socket

一.解决var/run/mysqld没有pid和sock文件 MySQL下mysql.sock丢失丢失的原因一般是因为配置文件不一致的原因,mysqld 错误启动,mysqld_safe 会清除一次mysql.sock .解决方法是: 判断一般人解决故障时没有切换到mysql用户,造成权限有问题,无法创建mysql授权表,所以也就无法创建/tmp/mysql.sock 和hostname.pid文件.因此,总结解决方法如下: #su mysql  // root 用户也是可以的 $/usr/lo

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

报了:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)的错。

解决方法: 1.查看是不是mysql权限的问题 (默认安装方式为 yum -y install mysql) 转到  /etc/rc.d/init.d/目录下 [[email protected] init.d]# mysqld status2018-06-11 15:20:47 0 [Warning] TIMESTAMP with implicit DEFAULT value is depreca ted. Please use --explicit_defaults_for_timestam