码迷,mamicode.com
首页 > 数据库 > 详细

Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)

时间:2019-05-07 01:28:46      阅读:311      评论:0      收藏:0      [点我收藏+]

标签:启动   sed   目录   报错   出现   jobs   ali   com   mysql启动不了   

ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/opt/lampp/var/mysql/mysql.sock‘ (2)

 

 

 

原因:系统盘满了

[root@localhost opt]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
18G 17G 0 100% /
tmpfs 504M 0 504M 0% /dev/shm
/dev/sda1 477M 80M 372M 18% /boot
[root@localhost opt]#

解决:

删除大文件后,重启系统解决

 

 

[root@localhost mysql]# /opt/lampp/lampp status
Version: XAMPP for Linux 1.8.3-3
Apache is not running.
MySQL is not running.
ProFTPD is running.

 

df: 未处理文件系统
[root@localhost opt]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
18G 17G 0 100% /
tmpfs 504M 0 504M 0% /dev/shm
/dev/sda1 477M 80M 372M 18% /boot
[root@localhost opt]#

 

 

[root@localhost ~]# /opt/lampp/lampp status
Version: XAMPP for Linux 1.8.3-3
Apache is not running.
MySQL is running.
ProFTPD is running.

 

 

 

xampp 无法启动mysql 找不到mysql.sock

 (2016-02-24 23:21:24)
  分类: 技术
出现的问题:
如果xampp中的mysql启动不了,出现ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/opt/lampp/var/mysql/mysql.sock‘ (2)报错,
停止xampp的时候报:
-bash-4.1# /opt/lampp/lampp stop
Stopping XAMPP for Linux 1.8.2-6...
XAMPP: Stopping Apache...ok.
XAMPP: Stopping MySQL...ok.
XAMPP: Stopping ProFTPD...kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
fail.

解决办法:
如果网上一些方法不好用的话,可以试试以下方法:
1. 确定系统盘是否满了
#df -h
2. 删除/opt/lampp目录中的pid文件(删掉后xampp重启时会重建,如果不放心,可以先备份lampp目录)
删除mysql相关缓存:
#rm -rf /opt/lampp/var/mysql/VM_*  
删除proftp相关缓存:
#rm -rf /opt/lampp/var/proftpd.pid
如果找不到pid文件,可以搜一下:
#find /opt/lampp -name ‘*.pid‘

 

Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)

标签:启动   sed   目录   报错   出现   jobs   ali   com   mysql启动不了   

原文地址:https://www.cnblogs.com/python-xiakaibi/p/10823135.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!