Results 1 to 5 of 5

Thread: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysq

  1. #1
    Junior Member
    Join Date
    Aug 2017
    Posts
    2

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysq

    Hi guys,
    I have a problem with mysql, I installed kali last version and when I un this command
    Code:
    mysql -u root -p
    I get this error
    Code:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    I reinstalled mysql but still I get that error
    (...edited...)
    but it doesn't work
    What should I do?
    thanks for your help.
    Last edited by alexertech; 2017-08-09 at 09:58 PM. Reason: removed youtube url

  2. #2
    Blindly following youtube videos in not always the best route to go, especially when the authors of the videos do not know what they are doing. Please check the https://kali.training website where you can learn more about service management - https://kali.training/chapter-5/configuring-services/
    Want to learn to use the Kali Linux operating system? Check out the free Kali book and course at https://kali.training

  3. #3
    Junior Member
    Join Date
    Aug 2017
    Posts
    2
    yes, you're right.
    but now I really don't know what's should I do
    I run this
    Code:
    apt install mysql-server
    I get this
    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     mysql-server : Depends: mysql-server-5.5 but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    then I run this
    Code:
    apt install mysql-server-5.5
    I get this
    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     mysql-server-5.5 : PreDepends: mysql-common (>= 5.5.43-0+deb8u1) but it is not going to be installed
                        Depends: mysql-client-5.5 (>= 5.5.43-0+deb8u1) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    then I run this
    Code:
    apt install mysql-common
    I get this
    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    mysql-common is already the newest version (5.8+1.0.3).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    then I run this
    Code:
    apt install mysql-client-5.5
    I get this
    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    mysql-client-5.5 is already the newest version (5.5.43-0+deb8u1).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    I've been really confused
    What's wrong?
    thanks

  4. #4
    Wow, messy! Can you show the contents of /etc/apt/sources.list ? Also, show the output of the command "uname -a".
    Want to learn to use the Kali Linux operating system? Check out the free Kali book and course at https://kali.training

  5. #5
    Junior Member
    Join Date
    Dec 2016
    Posts
    19
    Quote Originally Posted by muts View Post
    Blindly following youtube videos in not always the best route to go, especially when the authors of the videos do not know what they are doing. Please check the https://kali.training website where you can learn more about service management - https://kali.training/chapter-5/configuring-services/
    Yo muts, your my idol you made all this happen. Great job I work security and long hrs sitting at a desk with nothing but Kali Linux. Check out my ebook on kindle Kali Linux handyman The ins and outs of Kali Linux. Enjoy bud!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •