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

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

    Open the terminal and type:

    sudo apt-get purge mysql-client-core-5.6
    
    sudo apt-get autoremove
    
    sudo apt-get autoclean
    
    sudo apt-get install mysql-client-core-5.5
    
    sudo apt-get install mysql-server  
    

    Both MySQL database core client and MySQL Server packages will be the same version 5.5. MySQL Client 5.5 and MySQL Server 5.5 are the current "best" versions of these packages in Ubuntu 14.04 as determined by the package maintainers.

    If you would rather install MySQL Client 5.6 and MySQL Server 5.6 you can also find the mysql-client-core-5.6 and mysql-server-5.6 packages in the Ubuntu Software Center. The important thing is that the client and server version numbers match in either case.

    This worked for me.

提交回复
热议问题