Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    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)

    RahulBy 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.

    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
    Previous ArticleHow to Install Apache OFBiz on Linux
    Next Article How to Install CakePHP 3.6 on CentOS/RHEL 7/6

    Related Posts

    How To Install Linux, Nginx, MySQL, & PHP (LEMP Stack) on Ubuntu 22.04

    Updated:April 7, 20227 Mins Read

    How To Install MySQL Server on Ubuntu 22.04

    Updated:April 6, 20224 Mins Read

    How To Install LAMP Stack on Ubuntu 22.04 LTS

    Updated:April 20, 20225 Mins Read

    How To Install MariaDB on Debian 11

    4 Mins Read

    How to Rename MySQL Database

    Updated:July 26, 20213 Mins Read

    How To Change MySQL User Password

    2 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    • (Resolved) Please install all available updates for your release before upgrading
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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