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

前端 未结 30 1167
离开以前
离开以前 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:01

    Check the "bind-adress" parameter in my.cnf.

    Else try with the command:

    mysql -h 127.0.0.1 -P 3306 -u root -p
    
    • -h for host 127.0.0.1, that is, localhost

    • -P (notice -P as uppercase) for port 3306, that is, the default port for MySQL

提交回复
热议问题