これ。「Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)」と「The server quit without updating PID file 」

これ。「Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)」と「The server quit without updating PID file 」
これ。「Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)」と「The server quit without updating PID file 」

現象

・mysql.server restartとやると
「The server quit without updating PID file 」

・mysqlと打つと
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

結論

いろいろな記事をみたが私のばあいの結論は
/usr/local/etc/my.cnf
if my.cnf file not exit, create new my.cnf,
and then copy and past fllow code.
なければ、my.cnfを作り下記のを丸っとコピペ。
あれば
if you already exit my.cnf.
add client section to your my.cnf
足りないところ
[client]のセクションだけを追加したら動いた。→ see

自分の場合
docker-compose up --build -dでbuild仕直し

もしvimのファイル開く度こう怒られたら「Error detected while processing function nerdtree」

.vimrcに
add .vimrc this

set swapfile
"$HOME/.vimrc
set directory=$HOME/.vim/swapfiles

として
and then

echo $HOMEで出力される
.vimフォルダの中に入って行って
current directory .vim, make folder

mkdir swapfiles

フォルダを作ってください

swapfileの場所を設定している。