Answer the question
In order to leave comments, you need to log in
Why does mysql stop working through unix sockets after replacing /tmp with a symlink?
My system is on the SSD and /home is on the HDD. To reduce wear on the SSD, I decided to make /tmp a symlink to ~/temp, set write permissions to everyone, and rebooted the system. Everything worked fine, there were files in /tmp, but when I tried to login to [email protected] via phpMyAdmin, I got "mysqli_real_connect(): (HY000/2002): No such file or directory". After removing the symlink, creating a normal /tmp and rebooting mysql started working again. Replacing localhost with 127.0.0.1 in the phpMyAdmin config didn't help, but the error changed to "Connection refused" (probably because root can only login via unix sockets).
Why did this error occur and how to fix it without violating the SSD and not allowing root to connect through non-unix sockets?
Answer the question
In order to leave comments, you need to log in
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
> To reduce SSD wear
Stop reading wear and tear stories. This does not apply to current SSDs. The current SSD will survive the hard drive bought at the same time and used in the same mode, and maybe even you.
Well, transferring SYSTEM / tmp to the user is a sign of idiocy. You have already been told about tmpfs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question