Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Issues»Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    By RahulDecember 14, 20141 Min Read

    Error:

    Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

    This is a common issue faced by MySQL administrators generally. I have also faced this issue many times on various server and almost I fixed this issues using one of below given solutions. We hope following solutions will fix your issue also.

    Advertisement

    Cause 1: MySQL service stopped

    Solution : To fix this issue start mysql daemon.

    service mysqld start
    

    Cause 2. Not enough space on / ( root ) partition.

    Solution: Check and free some space in root partition and restart MySQL service.

    # df -h
    

    Cause 3. Permission issue with /tmp directory

    Solution: Assign appropriate permissions to your /tmp directory.

    # chmod 1777 /tmp
    

    error MySQL
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Error: EACCES: permission denied, scandir (Resolved)

    (Resolved) MySQL connection error: certificate verify failed

    How to Connect Python with MySQL Database

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • System.out.println() Method in Java: A Beginner’s Guide
    • Split Command in Linux With Examples (Split Large Files)
    • Test Your Internet Speed from the Linux Terminal
    • 11 Practical Example of cat Command in Linux
    • sleep Command in Linux with Examples
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.