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


    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'
  • 相关阅读:
    Minio对象存储
    白话解说TCP/IP协议三次握手和四次挥手
    企业环境下MySQL5.5调优
    Mac下iTerm2配置lrzsz功能
    七牛云图床和Markdown使用
    SSIS: 把存储在数据库中的图片导出来
    关闭Outlook的时候使之最小化
    【转】CTE(公用表表达式)
    通过SSIS监控远程服务器磁盘空间并发送邮件报警
    在Windows Server 2008 R2 中架设 SMTP 服务器
  • 原文地址:https://www.cnblogs.com/python-xiakaibi/p/10823135.html
Copyright © 2020-2023  润新知