Results 1 to 2 of 2

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

  1. #1
    Join Date
    2022-Jan
    Posts
    2

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

    Mysql command doesn't work. When I check it via
    Code:
    systemctl status mysql
    it says "active(exited)". I did try to create new socket like
    Code:
    mkdir /var/run/mysqld
    mkfifo /var/run/mysqld/mysqld.sock
    chown -R mysql /var/run/mysqld/
    service mysql restart
    The only difference is the error ends with mysqld.sock' (111) instead of mysqld.sock' (2)

    I also tried to do similar thing in /run/mysqld/mysqld.sock and putting in my.cnf file socket = /var/run/mysqld/mysqld.sock instead of socket = /run/mysqld/mysqld.sock
    Idk what else I can do..

    upd: I discovered that socket path is taken from /etc/mysql/mariadb.conf.d/50-client.cnf, not my.cnf. Nonetheless, changes don't help, perhaps it's not even related...
    Last edited by Wh4t3v3r; 2022-01-13 at 09:40.

  2. #2
    Join Date
    2022-Jan
    Posts
    2
    Finally I resolved it by installing mysql-server under non-root user (although I used to try it earlier for root one and for whatever reason some problem cropped up; some security restrictions, I guess)

Similar Threads

  1. WSL - KEX - Unable to connect to Socket (10061)
    By climbing in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2020-09-09, 08:04
  2. Replies: 5
    Last Post: 2017-08-23, 06:57
  3. Masscan UI // Webpage ~ php5 php5-mysql mysql-server
    By Ceruleancerise in forum General Archive
    Replies: 2
    Last Post: 2017-07-02, 13:16
  4. How get local mysql password?
    By vlaszlo in forum General Archive
    Replies: 6
    Last Post: 2014-01-01, 20:27

Tags for this Thread

Posting Permissions

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