Results 1 to 6 of 6

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    2017-Aug
    Posts
    3

    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 21:58. 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
    Join Date
    2016-Dec
    Location
    Canada
    Posts
    326
    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!

  4. #4
    Join Date
    2017-Aug
    Posts
    3
    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

  5. #5
    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

  6. #6
    Join Date
    2017-Aug
    Posts
    3
    Quote Originally Posted by muts View Post
    Wow, messy! Can you show the contents of /etc/apt/sources.list ? Also, show the output of the command "uname -a".

    Code:
    Linux system 4.11.0-kali1-amd64 #1 SMP Debian 4.11.6-1kali1 (2017-06-21) x86_64 GNU/Linux
    Code:
    # deb cdrom:[Debian GNU/Linux 2017.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170416-06:32]/ kali-rolling contrib main non-free
    
    #deb cdrom:[Debian GNU/Linux 2017.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170416-06:32]/ kali-rolling contrib main non-free
    
    deb http://http.kali.org/kali kali-rolling main non-free contrib
    # deb-src http://http.kali.org/kali kali-rolling main non-free contrib
    
    deb http://old.kali.org/kali sana main non-free contrib
    # For source package access, uncomment the following line
    # deb-src http://old.kali.org/kali sana main non-free contrib
    
    deb http://old.kali.org/kali moto main non-free contrib
    # For source package access, uncomment the following line
    # deb-src http://old.kali.org/kali moto main non-free contrib

Similar Threads

  1. Replies: 1
    Last Post: 2022-01-14, 06:20
  2. mysql server runs but reports error in tables
    By SeTh in forum TroubleShooting Archive
    Replies: 2
    Last Post: 2014-06-02, 10:37
  3. Mysql error 2002 (hy000)
    By k0der in forum General Archive
    Replies: 1
    Last Post: 2014-05-16, 05:27
  4. How get local mysql password?
    By vlaszlo in forum General Archive
    Replies: 6
    Last Post: 2014-01-01, 20:27

Posting Permissions

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