error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' — Missing /var/run/mysqld/mysqld.sock

后端 未结 30 2477
日久生厌
日久生厌 2020-11-22 10:49

My problem started off with me not being able to log in as root any more on my mysql install. I was attempting to run mysql without passwords turned on... but whenever I

30条回答
  •  無奈伤痛
    2020-11-22 11:27

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

    solutions

    finally uninstall and reinstall mysql. **

    • sudo apt-get remove mysql-server
    • sudo apt-get remove mysql-client
    • sudo apt-get remove mysql-common
    • sudo apt-get remove phpmyadmin

    then install again by

    • sudo apt-get install mysql-server-5.6

    After this operation, 164 MB of additional disk space will be used.

    • Do you want to continue? [Y/n] Y press YES for complete installations

    ...... .......

    • At last you will get these lines....

      Setting up libhtml-template-perl (2.95-1) ...

      Setting up mysql-common-5.6 (5.6.16-1~exp1) ... Processing triggers for libc-bin (2.19-0ubuntu6) Processing triggers for ureadahead (0.100.0-16) ...

    • And then

      root@ubuntu1404:~# mysql -u root -p (for every password first u should use )

    • Enter password:

    • Note :Entered password should be same as the installation time password of mysql(like .root,system,admin,rahul etc...)

      Then type

    • USE rahul_db(database name);

    Thanks.**

提交回复
热议问题