ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

前端 未结 30 1169
离开以前
离开以前 2020-11-22 02:25

I installed LAMP on Ubuntu 12.04 LTS (Precise Pangolin) and then set root password on phpMyAdmin. I forgot the password and now I am unable to login. When I try to chan

30条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 03:20

    In my case it was that the disk was full and mysqld couldn't start anymore.

    Try to restart mysql service.

    > service mysql restart
    

    or

    > service mysql stop
    
    > service mysql start
    

    If it doesn't recognize stop command then it's definitely the disk space. You should make some space in the partition mysql is allocated or make the disk larger.

    Check the disk space with

    > df -h
    

提交回复
热议问题